Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Mar 2009 13:32:57 -0400 (EDT)
From:      Daniel Eischen <deischen@freebsd.org>
To:        John Baldwin <jhb@freebsd.org>
Cc:        threads@freebsd.org, freebsd-threads@freebsd.org
Subject:   Re: WITNESS for pthreads
Message-ID:  <Pine.GSO.4.64.0903311329480.20978@sea.ntplx.net>
In-Reply-To: <200903311038.43401.jhb@freebsd.org>
References:  <7D4F6788-0F12-4863-9635-7FADA9115D16@lakerest.net> <9157F968-5CCF-451C-9BA0-E12A957D6B38@lakerest.net> <Pine.GSO.4.64.0903310235580.5671@sea.ntplx.net> <200903311038.43401.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 31 Mar 2009, John Baldwin 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 think this is all overkill when we don't even have proper
pthread synchronization primitives in libthr that can be
used in shared memory.  And if we also implement robust mutexes,
then you have additional error-checking.

-- 
DE



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.64.0903311329480.20978>