From owner-freebsd-threads@FreeBSD.ORG Tue Mar 31 15:03:35 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 6B572106566B; Tue, 31 Mar 2009 15:03:35 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 394658FC26; Tue, 31 Mar 2009 15:03:35 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (pool-98-109-39-197.nwrknj.fios.verizon.net [98.109.39.197]) by cyrus.watson.org (Postfix) with ESMTPSA id D414D46B51; Tue, 31 Mar 2009 11:03:34 -0400 (EDT) Received: from localhost (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.14.3/8.14.3) with ESMTP id n2VF3Na1032302; Tue, 31 Mar 2009 11:03:29 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-threads@freebsd.org Date: Tue, 31 Mar 2009 10:38:43 -0400 User-Agent: KMail/1.9.7 References: <7D4F6788-0F12-4863-9635-7FADA9115D16@lakerest.net> <9157F968-5CCF-451C-9BA0-E12A957D6B38@lakerest.net> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200903311038.43401.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Tue, 31 Mar 2009 11:03:29 -0400 (EDT) X-Virus-Scanned: ClamAV 0.94.2/9186/Tue Mar 31 05:51:33 2009 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: threads@freebsd.org Subject: WITNESS for pthreads 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: Tue, 31 Mar 2009 15:03:36 -0000 On Tuesday 31 March 2009 2:50:27 am Daniel Eischen wrote: > > Ok, I have poked around at these... all the mutex attributes defined here > > do is set the attributes to shared. There does not seem to be any standard > > naming mechanism. > > Naming mechanism for what? Names shouldn't be needed for anything, > nor do I think it is desired. Off topic: names would be very helpful to port witness to pthreads. The thoughts I have had for doing this though would be to add a new _np attribute to set the name. I actually would like to write a 'libwitness' that basically overrides the various symbols and provides the name_np attribute and implement witness in the shared library on top of whatever pthreads library is in use. This would also allow it to be portable to other OS's. (Well, it could break pshared mutexes, but using the pointer-style types, you could have the libwitness allocate its own "mutex" structure which has a "real" mutex inside of it along with the name and other per-lock data it tracks. It would then forward mutex operations to the real pthreads library after performing LOR checks, etc.). -- John Baldwin