Bogus usage of tsleep(9) in USB.

Dag-Erling Smørgrav des at des.no
Fri Aug 20 06:50:55 PDT 2004


Pawel Jakub Dawidek <pjd at FreeBSD.org> writes:
> There are many calls to tsleep(9) with no timeout in our USB code.
> As you all know, it is not permitted and we have KASSERT() for this:
>
>         KASSERT(timo != 0 || mtx_owned(&Giant) || mtx != NULL,
>             ("sleeping without a mutex"));

This panic message only applies to one of the three conditions the
KASSERT tests.  It should probably be split into three separate
KASSERTs with three different panic messages.

DES
-- 
Dag-Erling Smørgrav - des at des.no


More information about the freebsd-current mailing list