From owner-freebsd-threads@FreeBSD.ORG Mon Mar 30 21:16:48 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 BA223106566B for ; Mon, 30 Mar 2009 21:16:48 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.delphij.net (delphij-pt.tunnel.tserv2.fmt.ipv6.he.net [IPv6:2001:470:1f03:2c9::2]) by mx1.freebsd.org (Postfix) with ESMTP id 5EBBB8FC08 for ; Mon, 30 Mar 2009 21:16:48 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [211.166.10.233]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tarsier.delphij.net (Postfix) with ESMTPS id 420D728448 for ; Tue, 31 Mar 2009 05:16:47 +0800 (CST) Received: from localhost (tarsier.geekcn.org [211.166.10.233]) by tarsier.geekcn.org (Postfix) with ESMTP id E54A9EB7261; Tue, 31 Mar 2009 05:16:46 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([211.166.10.233]) by localhost (mail.geekcn.org [211.166.10.233]) (amavisd-new, port 10024) with ESMTP id zBarfh+AhXb1; Tue, 31 Mar 2009 05:16:42 +0800 (CST) Received: from charlie.delphij.net (adsl-76-237-33-62.dsl.pltn13.sbcglobal.net [76.237.33.62]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTPSA id CE230EB6F10; Tue, 31 Mar 2009 05:16:39 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:reply-to:organization:user-agent: mime-version:to:cc:subject:references:in-reply-to: x-enigmail-version:openpgp:content-type:content-transfer-encoding; b=suqxa8LxWN4lDwuG4gQ2sWDwdISPD18e2zSnZTwv9bM2FbV6CMjvjI+STt2uVqX0g ZtoEexXr72cL8VFUKoNqg== Message-ID: <49D136B1.6060809@delphij.net> Date: Mon, 30 Mar 2009 14:16:33 -0700 From: Xin LI Organization: The FreeBSD Project User-Agent: Thunderbird 2.0.0.21 (X11/20090324) MIME-Version: 1.0 To: Randall Stewart References: <7D4F6788-0F12-4863-9635-7FADA9115D16@lakerest.net> In-Reply-To: <7D4F6788-0F12-4863-9635-7FADA9115D16@lakerest.net> X-Enigmail-Version: 0.95.7 OpenPGP: id=18EDEBA0; url=http://www.delphij.net/delphij.asc Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: threads@freebsd.org Subject: Re: A mutex for inter-process ;-) X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2009 21:16:49 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Randall Stewart wrote: > Hi all: > > I have recently written a small set of routines that allow > two process to have a "mutex" between them.. actually it allows > all of the threads in any set of processes to have mutexes between > themselves ;-) > > Anyway it seems to be working fairly well.. I still have to write a man > page > for it (documentation always last).. and eventually I would like to port in > some of the WITNESS type features since the mutex's have names.. > > I probably should also think about scaling it up a bit.. right now its > really > more for a small scale (100 or less mutexes)... > > Who should I talk to about getting this in... having it reviewed etc. I > think > it belongs in libthr since it really needs the tid of the pthreads from the > pthread_t type... and for now I have a horrible hack in to get it ;-) I think davidxu@ deischen@ and julian@? BTW. How do you handle with one process exit (abnormally) without releasing the mutex? Just curious :) Cheers, - -- Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (FreeBSD) iEYEARECAAYFAknRNrEACgkQi+vbBBjt66DIswCbBWRMJN55c60UTBBIZMRCY4zo 6hcAnixfVXdtdnn0fT/Z31v0EdyVCVlH =JL/U -----END PGP SIGNATURE-----