From owner-svn-src-all@FreeBSD.ORG Wed Jun 16 12:24:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D240C1065678 for ; Wed, 16 Jun 2010 12:24:02 +0000 (UTC) (envelope-from rbgarga@gmail.com) Received: from mail-ww0-f54.google.com (mail-ww0-f54.google.com [74.125.82.54]) by mx1.freebsd.org (Postfix) with ESMTP id 58E3F8FC1D for ; Wed, 16 Jun 2010 12:24:01 +0000 (UTC) Received: by wwa36 with SMTP id 36so1922398wwa.13 for ; Wed, 16 Jun 2010 05:23:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=dVh+gkWa5QtyNnwB+xmZDAQWxyY7TuQRy1hdJc2EYJU=; b=v1y0zK9NMo+ChZzdRFg1RPif9cvFvUKcD6oMhPlD8O/MDFiJ6g6pJyjYDy7akcU7HS 0+xrFsFqxYyBnNoPQLvzh2+/88kOye9LcHjWQzw0U62/EqX1BD9c5YsAp/60gWcxA205 IeYdPLk1pc9UxIkA6MPDJgtv/BbdR4R+oEgqk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=JCs4m10y6i+E1XkEp0FLd4hYpWBfcc38QCWeFj+SlgoRRThwlpnnMUGBMrMwlvwq3b 5uhhPIsRKzsswUvRPyorxUgkfy4wVEGLnfpxqQUyB6Nlc+3sCmezarfwNT/F/OWhUEoY cH69X20LGO/CaJCOBOQP/24BGACXMRo4fBHus= Received: by 10.216.174.21 with SMTP id w21mr628786wel.14.1276690616257; Wed, 16 Jun 2010 05:16:56 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.165.207 with HTTP; Wed, 16 Jun 2010 05:16:36 -0700 (PDT) In-Reply-To: <201001050237.o052bxEd061444@svn.freebsd.org> References: <201001050237.o052bxEd061444@svn.freebsd.org> From: Renato Botelho Date: Wed, 16 Jun 2010 09:16:36 -0300 Message-ID: To: David Xu Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r201546 - in head: . include lib/libc/gen lib/libc/include lib/libthr lib/libthr/thread sys/kern sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jun 2010 12:24:03 -0000 On Mon, Jan 4, 2010 at 11:37 PM, David Xu wrote: > Author: davidxu > Date: Tue Jan =A05 02:37:59 2010 > New Revision: 201546 > URL: http://svn.freebsd.org/changeset/base/201546 > > Log: > =A0Use umtx to implement process sharable semaphore, to make this work, > =A0now type sema_t is a structure which can be put in a shared memory are= a, > =A0and multiple processes can operate it concurrently. > =A0User can either use mmap(MAP_SHARED) + sem_init(pshared=3D1) or use se= m_open() > =A0to initialize a shared semaphore. > =A0Named semaphore uses file system and is located in /tmp directory, and= its > =A0file name is prefixed with 'SEMD', so now it is chroot or jail friendl= y. > =A0In simplist cases, both for named and un-named semaphore, userland cod= e > =A0does not have to enter kernel to reduce/increase semaphore's count. > =A0The semaphore is designed to be crash-safe, it means even if an applic= ation > =A0is crashed in the middle of operating semaphore, the semaphore state i= s > =A0still safely recovered by later use, there is no waiter counter mainta= ined > =A0by userland code. > =A0The main semaphore code is in libc and libthr only has some necessary = stubs, > =A0this makes it possible that a non-threaded application can use semapho= re > =A0without linking to thread library. > =A0Old semaphore implementation is kept libc to maintain binary compatibi= lity. > =A0The kernel ksem API is no longer used in the new implemenation. > > =A0Discussed on: threads@ > > Added: > =A0head/include/semaphore.h =A0 (contents, props changed) > =A0head/lib/libc/gen/sem_new.c =A0 (contents, props changed) > =A0head/lib/libthr/thread/thr_sem_new.c =A0 (contents, props changed) > Deleted: > =A0head/sys/sys/semaphore.h > Modified: > =A0head/ObsoleteFiles.inc > =A0head/include/Makefile > =A0head/lib/libc/gen/Makefile.inc > =A0head/lib/libc/gen/Symbol.map > =A0head/lib/libc/gen/_pthread_stubs.c > =A0head/lib/libc/gen/sem.c > =A0head/lib/libc/include/libc_private.h > =A0head/lib/libthr/pthread.map > =A0head/lib/libthr/thread/Makefile.inc > =A0head/lib/libthr/thread/thr_init.c > =A0head/lib/libthr/thread/thr_private.h > =A0head/lib/libthr/thread/thr_sem.c > =A0head/sys/kern/uipc_sem.c > =A0head/sys/sys/_semaphore.h > > Modified: head/ObsoleteFiles.inc > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/ObsoleteFiles.inc =A0 =A0 =A0Tue Jan =A05 02:06:05 2010 =A0 =A0 = =A0 =A0(r201545) > +++ head/ObsoleteFiles.inc =A0 =A0 =A0Tue Jan =A05 02:37:59 2010 =A0 =A0 = =A0 =A0(r201546) > @@ -14,6 +14,8 @@ > =A0# The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS= last. > =A0# > > +# 20100105: new userland semaphore implementation > +OLD_FILES+=3Dusr/include/sys/semaphore.h Everythime I update my -CURRENT this file is installed again, and is listed when i run make check-old, I think there is something wrong. --=20 Renato Botelho