first patch for process-shared semaphore
David Xu
davidxu at freebsd.org
Thu Dec 24 01:22:36 UTC 2009
Alexander Kabaev wrote:
> On Wed, 23 Dec 2009 09:49:53 +0800
> David Xu <davidxu at freebsd.org> wrote:
>
>> This is my first attempt to make process-shared mutex work, this means
>> you can mmap(MAP_SHARED) a memory area, and put semaphore there,
>> or you can sem_open a named semaphore, and just use it between
>> processes, the named semaphore uses file system and mmap(), directory
>> /tmp/.semaphore is used as IPC directory, any named semaphore
>> locates in the directory. old semaphore implementation still exists
>> to make it binary compatible, it uses symbol version.
>>
>> http://people.freebsd.org/~davidxu/patch/shared_semaphore_1.patch
>>
>>
>> David Xu
>>
>> _______________________________________________
>> freebsd-threads at freebsd.org mailing list
>> http://lists.freebsd.org/mailman/listinfo/freebsd-threads
>> To unsubscribe, send any mail to
>> "freebsd-threads-unsubscribe at freebsd.org"
>
> Hi,
>
> is libthr really required for semaphores? Semaphore API seem
> orthogonal to pthreads. None of the man pages on OpenGroup size
> indicate where these belong, but they put sem_open & friends into
> REALTIME group and Linux has them in librt.
>
libthr does not require semaphore, it implements semaphore,
it is easier than other ways to implement the process-shared.
More information about the freebsd-threads
mailing list