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

Matthew Dillon dillon at apollo.backplane.com
Wed Jan 16 10:10:49 PST 2008


    lockmgr_sleep(ident, lock, slpflags, wmesg, timeo)

    lockmgr_sleep can also figure out what kind of lock is held internally
    and deal with it, or it can just assume an exclusive lock.  Either way
    lkflags do not have to be passed to it.

:If we're going to rename msleep() to spin_sleep() anyway, I suggest changing
:the prototype to
:
:spin_sleep(void *ident, int flags, const char *wmesg, int timo,
:	struct spinlock *spin)

    We want all the *sleep() procedures to use a similar prototype,
    and in this case being compatible with our own history as well
    as FreeBSD's will reduce confusion to a minimum.  That means putting
    the lock as the second argument.

    spin_sleep(ident, spin, slpflags, wmesg, timeo)

					-Matt
					Matthew Dillon 
					<dillon at backplane.com>





More information about the Submit mailing list