From owner-freebsd-threads@FreeBSD.ORG Thu Dec 24 16:53:42 2009 Return-Path: Delivered-To: threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 13191106568B for ; Thu, 24 Dec 2009 16:53:42 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-fx0-f227.google.com (mail-fx0-f227.google.com [209.85.220.227]) by mx1.freebsd.org (Postfix) with ESMTP id 9B56E8FC1D for ; Thu, 24 Dec 2009 16:53:41 +0000 (UTC) Received: by fxm27 with SMTP id 27so8446144fxm.3 for ; Thu, 24 Dec 2009 08:53:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type; bh=Z7gKUO5h3FcHhRcnh9gsDAjL9AOxsdDty8+uH2bvkIE=; b=Mfz+aJ2yHACGsC699e9+DBDfj/AeNRC8tHzH+uzlT5uPmwJ19UiJtnpvj95Ta/qQkC QqBdXIhtYmc1euZs17jCfNNEn0ULCYO8RUvz7ebgcI96cwTynNB+Ae5wua84bvjt49w1 hP8Z1KdnzZbiDKZ9SLYLjtkorX0YUOhRzVWUY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=ffU4gnetC5xwc3yVb+hJGWxWJ6apAjW716fZhdwNcVcMXtV6SnparCMQy/qE9rwCTL UJvzQ7EKDzVo+Vjt2WSrfSFRieLzgbtON1hNPd4IUpyxo25lIAqj0b2rHvqB+uA3pQ4M 1SE6Dqy6QwznKYP09FDMeRosMye+ghqmlpk9E= MIME-Version: 1.0 Sender: asmrookie@gmail.com Received: by 10.223.4.132 with SMTP id 4mr7348364far.45.1261672102079; Thu, 24 Dec 2009 08:28:22 -0800 (PST) In-Reply-To: <20091223221219.4416cef6@kan.dnsalias.net> References: <4B317741.8080004@freebsd.org> <20091223074707.2a7ca9d6@kan.dnsalias.net> <4B32C25A.8040703@freebsd.org> <20091223203539.400bbfda@kan.dnsalias.net> <4B32CADA.4010407@freebsd.org> <20091223221219.4416cef6@kan.dnsalias.net> Date: Thu, 24 Dec 2009 17:28:22 +0100 X-Google-Sender-Auth: 40908e5533c483c5 Message-ID: <3bbf2fe10912240828x636d9f3ficc9035b0aa584334@mail.gmail.com> From: Attilio Rao To: Alexander Kabaev Content-Type: text/plain; charset=UTF-8 Cc: threads@freebsd.org, David Xu Subject: Re: first patch for process-shared semaphore X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Dec 2009 16:53:42 -0000 2009/12/24 Alexander Kabaev : > On Thu, 24 Dec 2009 09:58:50 +0800 > David Xu wrote: > >> Alexander Kabaev wrote: >> > On Thu, 24 Dec 2009 09:22:34 +0800 >> > David Xu wrote: >> >> libthr does not require semaphore, it implements semaphore, >> >> it is easier than other ways to implement the process-shared. >> >> >> > Let me rephrase: I do not think semaphores belong in libthr. They >> > should be either in libc or in librt. >> > >> > >> OK, does others really implement semaphore in librt ? >> unfortunately, the librt already requires libpthread to implement >> SIGEV_THREAD. > > I retract that. It appears that there is no consistency - Solaris put > these into libc, Linux into libpthread ans SUSv2 hints that these > belong with realtime functions. libthr is fine. Beside that, though, semaphores should be thread library-agnostic so I would implement them into a different namespace (libc, for the POSIX compatibility, seems the most appropriate choice). Attilio -- Peace can only be achieved by understanding - A. Einstein