From owner-freebsd-threads@FreeBSD.ORG Tue Mar 31 18:22:35 2009 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 23C4110657BB; Tue, 31 Mar 2009 18:22:35 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 100388FC0A; Tue, 31 Mar 2009 18:22:34 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id CBE0C1A3C39; Tue, 31 Mar 2009 10:44:01 -0700 (PDT) Date: Tue, 31 Mar 2009 10:44:01 -0700 From: Alfred Perlstein To: John Baldwin Message-ID: <20090331174401.GD92757@elvis.mu.org> References: <7D4F6788-0F12-4863-9635-7FADA9115D16@lakerest.net> <9157F968-5CCF-451C-9BA0-E12A957D6B38@lakerest.net> <200903311038.43401.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200903311038.43401.jhb@freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: threads@freebsd.org, freebsd-threads@freebsd.org Subject: Re: 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 18:22:35 -0000 * John Baldwin [090331 08:03] wrote: > 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.). I've heard of this work being done by multiple other places in house. so you have a great idea, if you have time to run with it, it would likely eb greatly appreciated and give FreeBSD a big bump as a development platform. -alfred