Add FILEDESC_UNLOCK_ASSERT() macro which asserts that the filedesc is not

being held by the current thread (at least exclusively).

MFC after:	1 month
This commit is contained in:
pjd 2012-06-14 15:24:45 +00:00
parent 0acbbcc5fb
commit e5880d5fb5

View File

@ -105,6 +105,7 @@ struct filedesc_to_leader {
SX_NOTRECURSED)
#define FILEDESC_XLOCK_ASSERT(fdp) sx_assert(&(fdp)->fd_sx, SX_XLOCKED | \
SX_NOTRECURSED)
#define FILEDESC_UNLOCK_ASSERT(fdp) sx_assert(&(fdp)->fd_sx, SX_UNLOCKED)
struct thread;