Subject: Re: Lock benchmarks
To: Nathan J. Williams <nathanw@wasabisystems.com>
From: Jason R Thorpe <thorpej@wasabisystems.com>
List: tech-kern
Date: 09/18/2002 15:36:16
On Wed, Sep 18, 2002 at 06:31:59PM -0400, Nathan J. Williams wrote:

 > The pthread_spin_lock() function is specified as a "you are likely to
 > lose" function. It would be easy to make it loop around
 > __cpu_simple_lock_try(), but it is under no obligation whatsoever to
 > detect deadlock (which would anyway only be valid if the *calling
 > thread* already held the lock).

Sure, but the EDEADLK return value is allowed by POSIX, and I don't see
a good reason why we shouldn't support it.

 > There's a good reason that the internal spinlock primitives in the
 > pthread library are different from pthread_spin_lock().

Yes, knew that part, at least :-)

-- 
        -- Jason R. Thorpe <thorpej@wasabisystems.com>