[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: a recursive lock prototype

From: Igor Khavkine
Subject: Re: a recursive lock prototype
Date: Thu, 5 Jul 2001 18:25:51 -0400
User-agent: Mutt/1.3.18i

On Thu, Jul 05, 2001 at 10:51:21AM -0500, Marcus Brinkmann wrote:
> On Wed, Jul 04, 2001 at 06:13:23PM -0700, Thomas Bushnell, BSG wrote:
> > 
> > Maybe I missed something, but what specifically is this for? 
> You are missing out the LSM, a great event.  Many greetings from Bordeaux!
> Moshe asked about recursive locks today, which we don?t have.  He said
> it is easy to implement them ("five minutes"), but it turned out to take
> a bit longer when doing it right :)
> The C library needs recursive locks for the dynamic linker (loading object
> files at run time), and they might be quite useful in libraries, too
> (for better modularization).

Ideally, all the locking semantics would be implemented by the
system thread library. Right now for Hurd, that is cthreads,
and I assume your implementation is designed for that library.

The pthreads library has recursive locks in its specification. I
have implemented that feature in the pthreads code that I'm
working on right now. You're all welcome to examin it by going
to http://sf.net/project/hurd and from the CVS repository
look at pthreads/libc/pthread/pt-mutex.h. Any comments and
especially critiques are welcome.

The state of the code is the most of the functionality is already
implemented, except for the part of the thread instantiation code
that deals with signals. I'm once again, faced with a lack of
documentation reguarding `hurd_sigstate' and friends. I don't mind
reading the relevant bits of code (from glibc? hurd?). But I'm
not sure where to start.

The next state after that is to deal with global initialization (the
part that runs before main) and testing.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]