[libdispatch-dev] libpthread_workqueue released

Jordan K. Hubbard jkh at apple.com
Sun Jun 20 13:16:47 PDT 2010


Hi Mark,

That's very interesting, and certainly solves the portability problem for those OSes unwilling / unable to implement pthread workqueues in kernel space.  How are you planning on implementing the system-wide load balancing behavior?  A global semaphore of some sort, I would assume, but it's really your assumptions I think we're interested in. :)

Looking further forward, is this something you would like to propose as part of the "official libdispatch sources" for making the code base more portable?

Thanks,

- Jordan

On Jun 14, 2010, at 9:36 PM, Mark Heily wrote:

> I have written a pure userspace implementation of the Darwin pthread_workqueue API as used by libdispatch. This is based on Stacey Son's port to FreeBSD [1], but does not include any of the kernel bits. It's portable to a wide range of POSIX-compliant platforms. I have tested it under Linux, and it shows major improvements in the performance and stability of the libdispatch test suite.
> 
> I havn't implemented overcommit or multiple priority levels yet, but the basic workqueue functionality is there. I have a few ideas for adding kernel support and will be developing a Linux kernel module to complement the existing userspace code.
> 
> A tarball of the source code is here:
> 
> 	http://mark.heily.com/src/libpthread_workqueue-0.1.tar.gz
> 
> The SVN repository is available here:
> 
> 	svn://mark.heily.com/libpthread_workqueue
> 
> To try this with libdispatch, add '-lpthread_workqueue' to the LDADD variable in testing/Makefile.am.
> 
> Regards,
> 
> - Mark
> 
> [1] http://people.freebsd.org/~sson/thrworkq/
> _______________________________________________
> libdispatch-dev mailing list
> libdispatch-dev at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/libdispatch-dev



More information about the libdispatch-dev mailing list