lockmgr_sleep() (was Re: ssleep() (was Re: mention msleep() in porting_drivers.txt))

Aggelos Economopoulos aoiko at cc.ece.ntua.gr
Wed Jan 16 12:10:11 PST 2008


On Wednesday 16 January 2008, Aggelos Economopoulos wrote:
> On Wednesday 16 January 2008, Simon 'corecode' Schubert wrote:
[...]
> > lockmgr_sleep (or lock_sleep?) knows the internals of a lockmgr lock and 
> > thus can optimize the access.
> 
> Yes, but do you really want to split the code in
> 
> lockmgr()
> 	case LK_RELEASE:
> 
> to a seperate function and call it from lock_sleep()

Of course you don't. You mean that lock_sleep() can assume the lock is
already held and you could just implement a lockstatus_locked() and
call it there, or open code the check, right? I think the former is
infinitesimally better than returning the status from lockmgr().

Aggelos





More information about the Submit mailing list