Solaris portability / Pthread workqueue
I am interested in finding out more about the pthread workqueue API that libdispatch uses. Is there any documentation / man pages available? Glad to see a Solaris port of libdispatch coming along, great effort by Joakim. I understand that a full API support, including blocks and the kernel support is desirable. Thanks, -Prakash.
On Nov 19, 2009, at 5:51 PM, Prakash Sangappa wrote:
I am interested in finding out more about the pthread workqueue API that libdispatch uses. Is there any documentation / man pages available?
Hi, I have spending some quality time with the pthread workqueue API and all the documentation I could find was the source code (see pointers to source below). I suspect that there might be some internal apple docs given that a little dtracing reports that this API is very popular with darwin apps. Kernel bits: http://fxr.watson.org/fxr/source/bsd/kern/pthread_synch.c?v=xnu-1456.1.26 Pthread bits: http://www.opensource.apple.com/source/Libc/Libc-583/pthreads/pthread.c Search for: - pthread_workqueue_init_np() - pthread_workqueue_create_np() - pthread_workqueue_additem_np() - pthread_workqueue_attr_init_np() - pthread_workqueue_attr_destroy_np() - pthread_workqueue_attr_setqueuepriority_np() - pthread_workqueue_attr_getovercommit_np() - pthread_workqueue_attr_setovercommit_np() - pthread_workqueue_requestconcurrency_np() - pthread_workqueue_getovercommit_np() Also, I have a preliminary implementation of the pthread workqueue API for FreeBSD at: http://people.freebsd.org/~sson/thrworkq/ It "mostly" works on amd64/x86_64. Hopefully, I will have some time over the upcoming holiday to finish up some of the items I have listed on the TODO list. -stacey.
Thanks Stacey, -Prakash. Stacey Son wrote:
On Nov 19, 2009, at 5:51 PM, Prakash Sangappa wrote:
I am interested in finding out more about the pthread workqueue API that libdispatch uses. Is there any documentation / man pages available?
Hi,
I have spending some quality time with the pthread workqueue API and all the documentation I could find was the source code (see pointers to source below). I suspect that there might be some internal apple docs given that a little dtracing reports that this API is very popular with darwin apps.
Kernel bits: http://fxr.watson.org/fxr/source/bsd/kern/pthread_synch.c?v=xnu-1456.1.26
Pthread bits: http://www.opensource.apple.com/source/Libc/Libc-583/pthreads/pthread.c
Search for: - pthread_workqueue_init_np() - pthread_workqueue_create_np() - pthread_workqueue_additem_np() - pthread_workqueue_attr_init_np() - pthread_workqueue_attr_destroy_np() - pthread_workqueue_attr_setqueuepriority_np() - pthread_workqueue_attr_getovercommit_np() - pthread_workqueue_attr_setovercommit_np() - pthread_workqueue_requestconcurrency_np() - pthread_workqueue_getovercommit_np() Also, I have a preliminary implementation of the pthread workqueue API for FreeBSD at: http://people.freebsd.org/~sson/thrworkq/ <http://people.freebsd.org/%7Esson/thrworkq/>
It "mostly" works on amd64/x86_64. Hopefully, I will have some time over the upcoming holiday to finish up some of the items I have listed on the TODO list.
-stacey.
Prakash Sangappa wrote:
Glad to see a Solaris port of libdispatch coming along, great effort by Joakim. I understand that a full API support, including blocks and the kernel support is desirable.
I have made some good progress on porting libkqueue to Solaris. As of r106, libkqueue builds on Solaris, and uses port_create(3C) and port_getn(3C) to emulate the BSD kqueue() and kevent() syscalls. There is a lot more work to be done to get it working, but the basic framework is there. The project home page is http://mark.heily.com/libkqueue Regards, - Mark
participants (4)
-
Mark Heily
-
Prakash Sangappa
-
prakash sangappa
-
Stacey Son