Subject: Re: nesting simple_lock and spl*?
To: David Laight <firstname.lastname@example.org>
From: Jason R Thorpe <email@example.com>
Date: 05/25/2002 13:40:34
On Sat, May 25, 2002 at 08:59:20PM +0100, David Laight wrote:
> I found some problems with the 'solaris' semantics of saving the spl
> level within the mutex, the 'SVR4' semantics where the spl level
> is returned to the user are more flexible.
Some say "flexible", others say "error-prone".
> pl1 = read_lock( table_lock )
> entry = search_table( key );
> pl2 = lock( entry->lock );
> unlock( table_lock, pl2 );
> unlock( entry->lock, pl1 );
You can already do this with Solaris-style mutexes if they are adaptive
mutexes. Interrupt-blocking mutexes are meant to not be used that often
in the Solaris kernel (and I happen to agree with their approach).
-- Jason R. Thorpe <firstname.lastname@example.org>