diff options
author | rwatson <rwatson@FreeBSD.org> | 2004-10-09 16:42:57 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2004-10-09 16:42:57 +0000 |
commit | 405e05f570f5bcf7eecd7cef8ee07b5300a8e0c3 (patch) | |
tree | 41b5df0b1005e6bb835e9951a050d234e322c455 | |
parent | 22149b5972086cbecae60e94cbe8e93b57b3cb1e (diff) | |
download | FreeBSD-src-405e05f570f5bcf7eecd7cef8ee07b5300a8e0c3.zip FreeBSD-src-405e05f570f5bcf7eecd7cef8ee07b5300a8e0c3.tar.gz |
Add SOCKBUF_UNLOCK_ASSERT(), which asserts that the current thread does
not hold the mutex for a socket buffer.
-rw-r--r-- | sys/sys/socketvar.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/sys/socketvar.h b/sys/sys/socketvar.h index 8fad367..cc24814 100644 --- a/sys/sys/socketvar.h +++ b/sys/sys/socketvar.h @@ -173,6 +173,7 @@ extern struct mtx accept_mtx; #define SOCKBUF_OWNED(_sb) mtx_owned(SOCKBUF_MTX(_sb)) #define SOCKBUF_UNLOCK(_sb) mtx_unlock(SOCKBUF_MTX(_sb)) #define SOCKBUF_LOCK_ASSERT(_sb) mtx_assert(SOCKBUF_MTX(_sb), MA_OWNED) +#define SOCKBUF_UNLOCK_ASSERT(_sb) mtx_assert(SOCKBUF_MTX(_sb), MA_NOTOWNED) /* * Per-socket mutex: we reuse the receive socket buffer mutex for space |