mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-19 10:53:58 +00:00
Add SOCKBUF_UNLOCK_ASSERT(), which asserts that the current thread does
not hold the mutex for a socket buffer.
This commit is contained in:
parent
27dd55ed35
commit
b10eb61529
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=136326
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user