[haiku] Re: Any plans for pthread support?

  • From: Fredrik Holmqvist <fredrik.holmqvist@xxxxxxxxx>
  • To: haiku@xxxxxxxxxxxxx
  • Date: Tue, 22 Sep 2009 21:53:28 +0200

2009/9/22 Colin Günther <coling@xxxxxx>:
> You can take a look of my implementation here:
> http://dev.osdrawer.net/repositories/changes/haiku-wifi/trunk/wifi/libs/freebsd_network2/kern_condvar.c

I'm not sure that implementation is good enough. IIRC, it was a long
time since I looked at condvars, notifies should only be sent to those
waiting, not open up for future waiters when there is none.

You can look at our Mozilla impl:
http://svn.osdrawer.net/bezilla/trunk/nsprpub/pr/src/bthreads/btcvar.c
It uses benaphores for internal locking so it has traded some
readability for speed.

/Fredrik Holmqvist, TQH

Other related posts: