Date: Sat, 11 Aug 2007 14:46:12 +0200 From: Roman Divacky <rdivacky@freebsd.org> To: hackers@freebsd.org Subject: strange KASSERT in _sleep() Message-ID: <20070811124612.GA21695@freebsd.org>
next in thread | raw e-mail | index | archive | help
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 do I have to hold Giant or have timo != 0 when calling tsleep?
thnx for explanation
roman
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070811124612.GA21695>
