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
