lockmgr_sleep() (was Re: ssleep() (was Re: mention msleep() in porting_drivers.txt))
Simon 'corecode' Schubert
corecode at fs.ei.tum.de
Wed Jan 16 08:50:40 PST 2008
Aggelos Economopoulos wrote:
So, about adding a lockmgr_sleep(): I think it would be useful; open-coding
the whole thing makes it easy to slip in hard to notice bugs. But what should
the prototype be? If we follow the freebsd semantics, the lock should be re-
acquired on return. This means that we need to do a lockstatus() (which implies
a spin_lock_wr()) to get information that the caller probably has available or
Why? When we release the lock in lock_sleep, we will obtain the status
anyways, right?
* lockmgr_sleep(void *ident, int flags, const char *wmesg, int timeo,
struct lock *lk, int lkflags)
Looks nice this way, in case we need to pass the lkflags.
spin_sleep(void *ident, int flags, const char *wmesg, int timo,
struct spinlock *spin)
+1
The down side of course is having to change a couple of dozen call sites. But
as long as we're breaking people's patches with the name change, we might as
well fix the interface, assuming everyone agrees that's an improvement.
No problem. We could keep msleep() around for some time.
cheers
simon
--
Serve - BSD +++ RENT this banner advert +++ ASCII Ribbon /"\
Work - Mac +++ space for low â¬â¬â¬ NOW!1 +++ Campaign \ /
Party Enjoy Relax | http://dragonflybsd.org Against HTML \
Dude 2c 2 the max ! http://golden-apple.biz Mail + News / \
More information about the Submit
mailing list