Bogus usage of tsleep(9) in USB.

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

Pawel Jakub Dawidek <pjd at> 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.

Dag-Erling Smørgrav - des at

More information about the freebsd-current mailing list