Shared/exclusive (rw) locks

Tim Robbins tjr at freebsd.org
Mon Jul 5 22:37:35 PDT 2004


On Tue, Jul 06, 2004 at 11:05:35AM +0600, ngl wrote:
> Thanks
> 
> I've found it too.
> 
> But
> /*
>  * The general lock structure.  Provides for multiple shared locks,
>  * upgrading from shared to exclusive, and sleeping until the lock
>  * can be gained. The simple locks are defined in <machine/param.h>.
>  */
> 
> What means sleeping ? I need spinlock. 
> I cannot allow to fall asleep to kernel thread.

You'll need to use simplelocks or spls then, as appropriate to the
situation.


Tim

P.S.: This probably isn't the right mailing list for this discussion.


More information about the freebsd-stable mailing list