Date: Thu, 24 Dec 2009 09:22:34 +0800 From: David Xu <davidxu@freebsd.org> To: Alexander Kabaev <kabaev@gmail.com> Cc: threads@freebsd.org Subject: Re: first patch for process-shared semaphore Message-ID: <4B32C25A.8040703@freebsd.org> In-Reply-To: <20091223074707.2a7ca9d6@kan.dnsalias.net> References: <4B317741.8080004@freebsd.org> <20091223074707.2a7ca9d6@kan.dnsalias.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Alexander Kabaev wrote: > On Wed, 23 Dec 2009 09:49:53 +0800 > David Xu <davidxu@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@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-threads >> To unsubscribe, send any mail to >> "freebsd-threads-unsubscribe@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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4B32C25A.8040703>