mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 01:30:30 -04:00
sctp: Add macros to assert on inp info lock state
Reviewed by: tuexen MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D31756
This commit is contained in:
parent
92bb74fd4f
commit
be8ee77e9e
1 changed files with 12 additions and 0 deletions
|
|
@ -107,6 +107,18 @@ __FBSDID("$FreeBSD$");
|
|||
rw_wunlock(&SCTP_BASE_INFO(ipi_ep_mtx)); \
|
||||
} while (0)
|
||||
|
||||
#define SCTP_INP_INFO_LOCK_ASSERT() do { \
|
||||
rw_assert(&SCTP_BASE_INFO(ipi_ep_mtx), RA_LOCKED); \
|
||||
} while (0)
|
||||
|
||||
#define SCTP_INP_INFO_RLOCK_ASSERT() do { \
|
||||
rw_assert(&SCTP_BASE_INFO(ipi_ep_mtx), RA_RLOCKED); \
|
||||
} while (0)
|
||||
|
||||
#define SCTP_INP_INFO_WLOCK_ASSERT() do { \
|
||||
rw_assert(&SCTP_BASE_INFO(ipi_ep_mtx), RA_WLOCKED); \
|
||||
} while (0)
|
||||
|
||||
#define SCTP_MCORE_QLOCK_INIT(cpstr) do { \
|
||||
mtx_init(&(cpstr)->que_mtx, "sctp-mcore_queue","queue_lock", \
|
||||
MTX_DEF | MTX_DUPOK); \
|
||||
|
|
|
|||
Loading…
Reference in a new issue