From owner-freebsd-current@FreeBSD.ORG Wed Jan 6 02:55:21 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14C87106566B; Wed, 6 Jan 2010 02:55:21 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: from mail-qy0-f174.google.com (mail-qy0-f174.google.com [209.85.221.174]) by mx1.freebsd.org (Postfix) with ESMTP id 8D5848FC0A; Wed, 6 Jan 2010 02:55:20 +0000 (UTC) Received: by qyk4 with SMTP id 4so7055590qyk.7 for ; Tue, 05 Jan 2010 18:55:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:in-reply-to:references:x-mailer:mime-version :content-type; bh=MZ5KlF3mzoHdmMJuEGlWUKlM9isJF4EbBGnQsijMFJ0=; b=Y6gRUZJNZvW8YsOHh0zqm7/V4ODB7FsElaogJZFgqtRUfvl4b4XaWmNHEbeeA20mgw 8sLTj2TojatLO2mhLLNV99gQl/72/mrOdyaboks9zeybJKTjHyxwabcxZPPmr6N66wGc 6QAIazI3pN703R0ECEQI01D9vYYZAUV7NMctw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type; b=C9l5VUnwTQw2k7tr0W23Fb6lw6iFJ0PCa5x1+OKNpfJc6VUcTOsQ9RgDTnhLfHNRFO 5gL67u3Fg4NNQXq2mdRzMiBSSXX6RU5RdP6mqs8dojKAvSEe3JnSAUQEqD/RrlrSXx/W 6D2RyUDuRR5VHbOkExf6K06AKxSe0Yy+IDzvE= Received: by 10.224.36.6 with SMTP id r6mr12647499qad.219.1262746512369; Tue, 05 Jan 2010 18:55:12 -0800 (PST) Received: from kan.dnsalias.net (c-24-91-218-112.hsd1.ma.comcast.net [24.91.218.112]) by mx.google.com with ESMTPS id 26sm53613407qwa.40.2010.01.05.18.55.10 (version=SSLv3 cipher=RC4-MD5); Tue, 05 Jan 2010 18:55:10 -0800 (PST) Date: Tue, 5 Jan 2010 21:55:05 -0500 From: Alexander Kabaev To: Attilio Rao Message-ID: <20100105215505.451ff1da@kan.dnsalias.net> In-Reply-To: <3bbf2fe11001051838t38e872d3jae6c4f8be9e57ebc@mail.gmail.com> References: <4B43E358.609@freebsd.org> <3bbf2fe11001051838t38e872d3jae6c4f8be9e57ebc@mail.gmail.com> X-Mailer: Claws Mail 3.7.3 (GTK+ 2.18.5; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/7K7e8nFJiUYLswev06_pk=H"; protocol="application/pgp-signature" Cc: FreeBSD Current , David Xu Subject: Re: process-sharable pthread synchronous objects X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jan 2010 02:55:21 -0000 --Sig_/7K7e8nFJiUYLswev06_pk=H Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Wed, 6 Jan 2010 03:38:35 +0100 Attilio Rao wrote: > 2010/1/6 David Xu : > > I want to go further to make some pthread synchronous objects > > process-sharable, do you guy think it is worthy ? > > except mutex and condition variable, others like rwlock and spinlock > > are relative simple. >=20 > I'm afraid people is going to produce very messy system resulting in > process shared mutexes where IPC or threads may be used and causing > more harms than good. > Besides that, semaphore can "emulate" a fair amount of locking > features in a non-trivial fashion, forcing developers to think a lot > about it, thus reducing the risk of error. >=20 > Said that, I think that introducing shared semaphore has been a good > idea, but I would not go further than that. >=20 > Thanks, > Attilio >=20 >=20 I respectfully disagree and think having pthread-agnotsic locks processes can use to synchronize access to, say, shared memory segment content is a good think to have. People are perfectly capable of screwing up any powerful tool they are given, but that is not the reason to be held back. Solaris had lwp_{mutex|cond} for ages and lived. --=20 Alexander Kabaev --Sig_/7K7e8nFJiUYLswev06_pk=H Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.13 (FreeBSD) iD8DBQFLQ/uNQ6z1jMm+XZYRAnUTAJ9r8caQhQisn5ewuye36IyXJ8ZZTQCeNiUb 8V/1daIso4xZGe5FlgTrRO4= =Gj5d -----END PGP SIGNATURE----- --Sig_/7K7e8nFJiUYLswev06_pk=H--