[libdispatch-dev] libdispatch's thread model
Stacey Son
sson at FreeBSD.org
Thu Jan 28 08:23:41 PST 2010
On Jan 27, 2010, at 9:32 PM, Mark Heily wrote:
> Mario Schwalbe wrote:
>> I know that Apple's non-posix extension to pthread isn't available.
>> Nevertheless, it should be possible to at least use a bounded number of
>> worker threads less than MAX_THREAD_COUNT (255). What about dynamically
>> setting MAX_THREAD_COUNT (or a similar variable) to the number of processors
>> instead?
>
> Stacy Son has kindly documented the pthread_workqueue(3) API which should be very helpful to get the correct semantics [4].
FYI, I didn't document all of apple's pthread_workqueue_*_np() functions but just the more interesting ones.
Also, my system call interface is very different from apple's and not documented but I wasn't trying to keep that compatible with their implementation.
> [4]
>
> http://people.freebsd.org/~sson/thrworkq/pthread_workqueue_2009_12_14.diff
You might find http://people.freebsd.org/~sson/thrworkq/pthread_workqueue.3.txt a bit easier to read.
Regards,
-stacey.
More information about the libdispatch-dev
mailing list