Subject: Re: p_flag in struct proc: int -> uint64_t
To: Juergen Hannken-Illjes <hannken@eis.cs.tu-bs.de>
From: Jason Thorpe <thorpej@shagadelic.org>
List: tech-kern
Date: 10/09/2006 15:45:28
On Oct 9, 2006, at 1:43 AM, Juergen Hannken-Illjes wrote:

> The latter.  Call xxx_set() and xxx_get() with locks held.

Ok, well, getspecific is guaranteed to never sleep -- it acquires a  
simple_lock, but that should ~never be contended, and it will only  
spin in the contented case.  For LWPs, it currently does not even  
acquire the simple_lock, because an LWPs specificdata should only be  
accessed by the LWP itself (except under certain very controlled  
circumstances).

For setspecific, I could add a setspecific_nowait, but I'm concerned  
about what the failure mode is supposed to be if it were to fail...  
would you unwind your state, and try to set the data some other way,  
or would you fail the operation in some fashion?

-- thorpej