Re: a recursive lock prototype

2001-07-05 Thread Roland McGrath
> 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 o

Re: a recursive lock prototype

2001-07-05 Thread Igor Khavkine
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! > > Mosh

Re: a recursive lock prototype

2001-07-05 Thread Thomas Bushnell, BSG
Marcus Brinkmann <[EMAIL PROTECTED]> writes: > 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). Incidentally, it is my opinion that recursive locks don't improve modula

recursive locks

2001-07-05 Thread Thomas Bushnell, BSG
You want something like: struct recursive_lock { spin_lock_t guard; int count; thread_t owner; mutex_t lock; }; "guard" protects "count" and "owner", and it looks like this: lock: spin_lock (guard) if (not owned) assert (count == 0) owner = me mutex_lock (lock) if (

Re: a recursive lock prototype

2001-07-05 Thread Thomas Bushnell, BSG
Marcus Brinkmann <[EMAIL PROTECTED]> writes: > We agreed, in an inspiring coordinated coding effort, on the following > implementation (thanks to Johannes, Neal, Moshe and Rene): No, that still has a race condition as follows. We begin in the fully unlocked state. THREAD 1

Re: a recursive lock prototype

2001-07-05 Thread Marcus Brinkmann
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

Re: a recursive lock prototype

2001-07-05 Thread Thomas Bushnell, BSG
[EMAIL PROTECTED] (Niels Möller) writes: > I think a "recursive mutex" usually refers to a lock that keeps track > of an owner and a count. Well, that's what I usually think too. :) But it isn't close to what the posted functions do. :) ___ Bug-hur

SawMill Multiserver vs. the Hurd

2001-07-05 Thread Farid Hajji
Hello, the following paper describes the SawMill L4-based multiserver that is being developed at Big Blue: http://www.research.ibm.com/sawmill/sigops00.ps AFAIK, Sawmill didn't release any sources (yet?), but some of their (mainly) architecture papers are available. It's quite interesting to

Re: a recursive lock prototype

2001-07-05 Thread Niels Möller
[EMAIL PROTECTED] (Thomas Bushnell, BSG) writes: > What are the expected semantics of this function? (A complete > implementation of something always includes explanatory comments.) I think a "recursive mutex" usually refers to a lock that keeps track of an owner and a count. recursive_lock()