NAME_xlocked, SX_SYSINIT - kernel shared/exclusive lock
SYNOPSIS
#include <sys/param.h> #include <sys/lock); int sx_xlocked(struct sx *sx); prudently. Shared/exclusive locks are created with sx_init(), where sx is a pointer to space for a struct sx, and description is a pointer to a null- terminated argument.. sx_xlocked() will return non-zero if the current process holds the exclusive specific sleeping. As a result, an sx lock may not be acquired while holding a mutex. Otherwise, if one thread slept while holding an sx lock while another thread blocked on the same sx lock after acquiring a mutex, then the second thread would effectively end up sleeping while holding a mutex, which is not allowed.
SEE ALSO
condvar(9), mtx_pool(9), mutex(9), panic.