From owner-freebsd-stable@FreeBSD.ORG Tue Jun 9 06:37:03 2009 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA487106566C; Tue, 9 Jun 2009 06:37:03 +0000 (UTC) (envelope-from dudu@dudu.ro) Received: from mail-fx0-f214.google.com (mail-fx0-f214.google.com [209.85.220.214]) by mx1.freebsd.org (Postfix) with ESMTP id 3E78C8FC19; Tue, 9 Jun 2009 06:37:02 +0000 (UTC) (envelope-from dudu@dudu.ro) Received: by fxm10 with SMTP id 10so863661fxm.43 for ; Mon, 08 Jun 2009 23:37:02 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.114.135 with SMTP id e7mr4863286faq.89.1244529422082; Mon, 08 Jun 2009 23:37:02 -0700 (PDT) In-Reply-To: References: <20090601161903.GA40377@stack.nl> <4A24457C.6060100@FreeBSD.org> <200906020842.42330.jhb@freebsd.org> From: Vlad Galu Date: Tue, 9 Jun 2009 09:36:42 +0300 Message-ID: To: Ivan Voras Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-stable@freebsd.org Subject: Re: Unnamed POSIX shared semaphores X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2009 06:37:04 -0000 On Mon, Jun 8, 2009 at 3:57 PM, Ivan Voras wrote: > On a completely unrelated subject I was reading about PHP APC cache > where they have the same need - cross-process locking with locks > embedded in data structures and they have adopted userland spinlock code > from PostgreSQL: > > http://www.scribd.com/doc/3288293/brian-shireapc-facebook > > (spin)locks are not the same as sempahores but maybe it will help the OP > or anyone else trying to implement this feature: > > http://cvs.php.net/viewvc.cgi/pecl/apc/pgsql_s_lock.h?revision=3.4&view=markup > > http://cvs.php.net/viewvc.cgi/pecl/apc/pgsql_s_lock.c?revision=3.3&view=markup Thanks, Ivan. I'll take a better look at this after our first release, which is due in a couple of weeks. Right now the team efforts aren't focused on portability, so it's a low priority issue, but something we'd definitely like to have in the future.