Re: strange KASSERT in _sleep()

2007-08-11 Thread John-Mark Gurney
Roman Divacky wrote this message on Sat, Aug 11, 2007 at 14:46 +0200: > tsleep() maps to _sleep() with lock = NULL, > > the _sleep() contains this: > > KASSERT(timo != 0 || mtx_owned(&Giant) || lock != NULL || > ident == &lbolt, ("sleeping without a lock")); > > > which simplifi

strange KASSERT in _sleep()

2007-08-11 Thread Roman Divacky
hi tsleep() maps to _sleep() with lock = NULL, the _sleep() contains this: KASSERT(timo != 0 || mtx_owned(&Giant) || lock != NULL || ident == &lbolt, ("sleeping without a lock")); which simplifies for tsleep(foo, ...) where foo != lbolt to "timo != 0 || mtx_owned(&Giant)" why