Does Haiku core development have a pthreads package yet?


Was wondering if any of the core Haiku developers came into possesion of a ported pthreads library that could legally get included in the source tree? I think it was either related to the Mozilla porting process or some addition that the Zeta group had done.

Reason I ask is that that pthreads and a Posix networking stack is probably the only thing standing in the way of getting most of Mono working.

Mono… yes that would be nice :slight_smile:

I suspect it’s more than just pthreads, but I haven’t dug into it much myself. Let me know if you get serious about looking into a port - I’ve considered the possibility myself and would like to help out.

Zeta had some pthreads library. Someone tested it for building Firefox, but it’s of no use for Firefox as there is already native code for BeOS.

There is some pthread compatibility code in the tree, but I dont’ know how functional is it.

Zeta had a pthreads library that was supposed to be more up to date & better compatibility to support newer software.

They announced it back in Nov 2006 & said once more polished would share it with Haiku. ( which I wouldn’t count on ).

I checked Haiku & could not find libpthread.

So, I’m going to assume Haiku doesn’t have pthread library yet.

A few Bezilla developers got Zeta’s pthread lib but I believe it is the binary ( not the source ).

PS I stumbled upon pthread library source code for Zeta. I believe it is the new pthread version but can’t say for sure. You can try building & using it and contact the authors for more info.

There is code for pthreads.
We don’t have a (yet ?), but some code is there already.

sad that we don’t have a pthread is now inside, so not to worry.

After hearing this I confirmed it to be true. In order to make building easier, I opened a terminal and did this:

# cd /Haiku/develop/lib/x86 # ln -s

This creates a symlink to in a file called This way I don’t have to go in and modify a bunch of Makefiles. It seems to compile the resulting apps correctly.

NO NO NO, you don’t symlink it - that will fail on every other haiku install.

Instead, you fix the build system for whatever you’re building to only link to libpthread if it exists. otherwise all the pthread functions are already in libroot (which is linked automatically).

Same with libm btw - if you run into that.

This issue needs to be added to this page - enough people run into it: