Index: kern_sx.c =================================================================== RCS file: /private/FreeBSD/src/sys/kern/kern_sx.c,v retrieving revision 1.22 diff -u -p -r1.22 kern_sx.c --- kern_sx.c 4 Feb 2004 08:14:58 -0000 1.22 +++ kern_sx.c 6 Feb 2004 17:47:06 -0000 @@ -348,8 +348,12 @@ _sx_assert(struct sx *sx, int what, cons #ifdef WITNESS witness_assert(&sx->sx_object, what, file, line); #else + /* + * We are able to check only exclusive lock here, + * we cannot assert that *this* thread owns slock. + */ mtx_lock(sx->sx_lock); - if (sx->sx_cnt != 0 && sx->sx_xholder == curthread) + if (sx->sx_xholder == curthread) printf("Lock %s locked @ %s:%d\n", sx->sx_object.lo_name, file, line); mtx_unlock(sx->sx_lock);