[libdispatch-dev] Lion libdispatch sources posted & next steps for macosforge repo
Mark Heily
mark at heily.com
Sat Aug 20 22:58:29 PDT 2011
On 08/16/2011 05:32 PM, Daniel A. Steffen wrote:
> The Lion libdispatch sources are now available:
> http://www.opensource.apple.com/release/mac-os-x-107/
> http://www.opensource.apple.com/tarballs/libdispatch/libdispatch-187.5.tar.gz
>
> The configure/make buildsystem has been updated to produce a working
> libdispatch.dylib on Lion that can be used/installed in place of the
> stock version, see INSTALL for details.
>
Thanks a lot!
I notice that there is a new pthread_workqueue priority level named
WORKQ_BG_PRIOQUEUE. This will need to be added to libpthread_workqueue
in order for the new libdispatch to work. Can anyone tell me briefly
what the the semantics of this new priority level are?
By the way, the comment in Darwin libc pthread_workqueue.h needs to be
updated to reflect the addition of WORKQ_BG_PRIOQUEUE [1]. It currently
reads
"/* Kernel expected target concurrency of the workqueue clients
for the three priority queues */"
Now there are four priority queues.. yes, I know this is nit-picking :)
There's another suspicious comment in the same header file that reads
"/* WORKQ_HIGH/DEFAULT/LOW_PRIOQUEUE are the only valid values */"
My guess is that WORKQ_BG_PRIOQUEUE will also be a valid value.
> Next steps are to decide how to integrate the new sources into the
> macosforge repository; as you will discover, there has been
> significant refactoring/reorganization, making this not completely
> trivial.
>
> As a first step I was planning to import the Lion source drop on a
> branch, and then start reorganizing trunk similarly to make trunk
> changes that are missing from the branch more apparent.
>
I've taken the pristine Lion sources and created a patchset based on the
portability patches that went into the MacOSForge repository. I added
some additional patches to work around some new problems introduced with
Lion. I'm happy to report that everything builds on Linux and most of
the unit tests are working. I've published this work here:
https://www.heily.com/trac/libdispatch
This does not include the kqueue abstraction layer that Paolo referred
to in a previous post. I'm not willing to make such a large change to
the Lion sources when there is no practical benefit (sorry, Paolo). This
means that libkqueue will be needed on platforms which lack a native
kqueue(2) facility.
I think the best way forward would be to move the current trunk to the
tags/ directory for historical purposes, make a new trunk based on the
Lion sources, and apply my patches when they are ready. There's only a
dozen patches, and they are all fairly trivial.
Thanks,
- Mark
[1]
http://www.opensource.apple.com/source/Libc/Libc-763.11/pthreads/pthread_workqueue.h
More information about the libdispatch-dev
mailing list