#include <sys/cdefs.h>
Go to the source code of this file.
◆ _NETINET_SCTP_LOCK_BSD_H_
#define _NETINET_SCTP_LOCK_BSD_H_ |
◆ SCTP_ASOC_CREATE_LOCK
#define SCTP_ASOC_CREATE_LOCK |
( |
|
_inp | ) |
|
Value: do { \
mtx_lock(&(_inp)->inp_create_mtx); \
} while (0)
Definition at line 328 of file sctp_lock_bsd.h.
◆ SCTP_ASOC_CREATE_LOCK_CONTENDED
#define SCTP_ASOC_CREATE_LOCK_CONTENDED |
( |
|
_inp | ) |
((_inp)->inp_create_mtx.mtx_lock & MTX_CONTESTED) |
◆ SCTP_ASOC_CREATE_LOCK_DESTROY
#define SCTP_ASOC_CREATE_LOCK_DESTROY |
( |
|
_inp | ) |
|
Value: do { \
mtx_destroy(&(_inp)->inp_create_mtx); \
} while (0)
Definition at line 317 of file sctp_lock_bsd.h.
◆ SCTP_ASOC_CREATE_LOCK_INIT
#define SCTP_ASOC_CREATE_LOCK_INIT |
( |
|
_inp | ) |
|
Value: do { \
mtx_init(&(_inp)->inp_create_mtx, "sctp-create", "inp_create", \
MTX_DEF | MTX_DUPOK); \
} while (0)
Definition at line 312 of file sctp_lock_bsd.h.
◆ SCTP_ASOC_CREATE_UNLOCK
#define SCTP_ASOC_CREATE_UNLOCK |
( |
|
_inp | ) |
|
Value: do { \
mtx_unlock(&(_inp)->inp_create_mtx); \
} while (0)
Definition at line 333 of file sctp_lock_bsd.h.
◆ SCTP_DECR_ASOC_COUNT
#define SCTP_DECR_ASOC_COUNT |
( |
| ) |
|
Value: do { \
} while (0)
#define SCTP_BASE_INFO(__m)
Definition at line 465 of file sctp_lock_bsd.h.
◆ SCTP_DECR_CHK_COUNT
#define SCTP_DECR_CHK_COUNT |
( |
| ) |
|
Value: do { \
("ipi_count_chunk would become negative")); \
1); \
} while (0)
Definition at line 489 of file sctp_lock_bsd.h.
◆ SCTP_DECR_EP_COUNT
#define SCTP_DECR_EP_COUNT |
( |
| ) |
|
◆ SCTP_DECR_LADDR_COUNT
#define SCTP_DECR_LADDR_COUNT |
( |
| ) |
|
◆ SCTP_DECR_RADDR_COUNT
#define SCTP_DECR_RADDR_COUNT |
( |
| ) |
|
◆ SCTP_DECR_READQ_COUNT
#define SCTP_DECR_READQ_COUNT |
( |
| ) |
|
◆ SCTP_DECR_STRMOQ_COUNT
#define SCTP_DECR_STRMOQ_COUNT |
( |
| ) |
|
◆ SCTP_INCR_ASOC_COUNT
#define SCTP_INCR_ASOC_COUNT |
( |
| ) |
|
◆ SCTP_INCR_CHK_COUNT
#define SCTP_INCR_CHK_COUNT |
( |
| ) |
|
◆ SCTP_INCR_EP_COUNT
#define SCTP_INCR_EP_COUNT |
( |
| ) |
|
◆ SCTP_INCR_LADDR_COUNT
#define SCTP_INCR_LADDR_COUNT |
( |
| ) |
|
◆ SCTP_INCR_RADDR_COUNT
#define SCTP_INCR_RADDR_COUNT |
( |
| ) |
|
◆ SCTP_INCR_READQ_COUNT
#define SCTP_INCR_READQ_COUNT |
( |
| ) |
|
◆ SCTP_INCR_STRMOQ_COUNT
#define SCTP_INCR_STRMOQ_COUNT |
( |
| ) |
|
◆ SCTP_INP_DECR_REF
#define SCTP_INP_DECR_REF |
( |
|
_inp | ) |
atomic_add_int(&((_inp)->refcount), -1) |
◆ SCTP_INP_INCR_REF
#define SCTP_INP_INCR_REF |
( |
|
_inp | ) |
atomic_add_int(&((_inp)->refcount), 1) |
◆ SCTP_INP_INFO_LOCK_ASSERT
#define SCTP_INP_INFO_LOCK_ASSERT |
( |
| ) |
|
◆ SCTP_INP_INFO_LOCK_DESTROY
#define SCTP_INP_INFO_LOCK_DESTROY |
( |
| ) |
|
◆ SCTP_INP_INFO_LOCK_INIT
#define SCTP_INP_INFO_LOCK_INIT |
( |
| ) |
|
◆ SCTP_INP_INFO_RLOCK
#define SCTP_INP_INFO_RLOCK |
( |
| ) |
|
◆ SCTP_INP_INFO_RLOCK_ASSERT
#define SCTP_INP_INFO_RLOCK_ASSERT |
( |
| ) |
|
◆ SCTP_INP_INFO_RUNLOCK
#define SCTP_INP_INFO_RUNLOCK |
( |
| ) |
|
◆ SCTP_INP_INFO_WLOCK
#define SCTP_INP_INFO_WLOCK |
( |
| ) |
|
◆ SCTP_INP_INFO_WLOCK_ASSERT
#define SCTP_INP_INFO_WLOCK_ASSERT |
( |
| ) |
|
◆ SCTP_INP_INFO_WUNLOCK
#define SCTP_INP_INFO_WUNLOCK |
( |
| ) |
|
◆ SCTP_INP_LOCK_CONTENDED
#define SCTP_INP_LOCK_CONTENDED |
( |
|
_inp | ) |
((_inp)->inp_mtx.mtx_lock & MTX_CONTESTED) |
◆ SCTP_INP_LOCK_DESTROY
#define SCTP_INP_LOCK_DESTROY |
( |
|
_inp | ) |
|
Value: do { \
mtx_destroy(&(_inp)->inp_mtx); \
} while (0)
Definition at line 259 of file sctp_lock_bsd.h.
◆ SCTP_INP_LOCK_INIT
#define SCTP_INP_LOCK_INIT |
( |
|
_inp | ) |
|
Value: do { \
mtx_init(&(_inp)->inp_mtx, "sctp-inp", "inp", \
MTX_DEF | MTX_DUPOK); \
} while (0)
Definition at line 254 of file sctp_lock_bsd.h.
◆ SCTP_INP_READ_CONTENDED
#define SCTP_INP_READ_CONTENDED |
( |
|
_inp | ) |
((_inp)->inp_rdata_mtx.mtx_lock & MTX_CONTESTED) |
◆ SCTP_INP_READ_DESTROY
#define SCTP_INP_READ_DESTROY |
( |
|
_inp | ) |
|
Value: do { \
mtx_destroy(&(_inp)->inp_rdata_mtx); \
} while (0)
Definition at line 242 of file sctp_lock_bsd.h.
◆ SCTP_INP_READ_INIT
#define SCTP_INP_READ_INIT |
( |
|
_inp | ) |
|
Value: do { \
mtx_init(&(_inp)->inp_rdata_mtx, "sctp-read", "inpr", \
MTX_DEF | MTX_DUPOK); \
} while (0)
Definition at line 237 of file sctp_lock_bsd.h.
◆ SCTP_INP_READ_LOCK
#define SCTP_INP_READ_LOCK |
( |
|
_inp | ) |
|
Value: do { \
mtx_lock(&(_inp)->inp_rdata_mtx); \
} while (0)
Definition at line 246 of file sctp_lock_bsd.h.
◆ SCTP_INP_READ_UNLOCK
#define SCTP_INP_READ_UNLOCK |
( |
|
_inp | ) |
|
Value: do { \
mtx_unlock(&(_inp)->inp_rdata_mtx); \
} while (0)
Definition at line 250 of file sctp_lock_bsd.h.
◆ SCTP_INP_RLOCK
#define SCTP_INP_RLOCK |
( |
|
_inp | ) |
|
Value: do { \
mtx_lock(&(_inp)->inp_mtx); \
} while (0)
Definition at line 282 of file sctp_lock_bsd.h.
◆ SCTP_INP_RLOCK_ASSERT
#define SCTP_INP_RLOCK_ASSERT |
( |
|
_inp | ) |
|
Value: do { \
KASSERT(mtx_owned(&(_inp)->inp_mtx), \
("Don't own INP read lock")); \
} while (0)
Definition at line 299 of file sctp_lock_bsd.h.
◆ SCTP_INP_RUNLOCK
#define SCTP_INP_RUNLOCK |
( |
|
_inp | ) |
|
Value: do { \
mtx_unlock(&(_inp)->inp_mtx); \
} while (0)
Definition at line 291 of file sctp_lock_bsd.h.
◆ SCTP_INP_WLOCK
#define SCTP_INP_WLOCK |
( |
|
_inp | ) |
|
Value: do { \
mtx_lock(&(_inp)->inp_mtx); \
} while (0)
Definition at line 286 of file sctp_lock_bsd.h.
◆ SCTP_INP_WLOCK_ASSERT
#define SCTP_INP_WLOCK_ASSERT |
( |
|
_inp | ) |
|
Value: do { \
KASSERT(mtx_owned(&(_inp)->inp_mtx), \
("Don't own INP write lock")); \
} while (0)
Definition at line 304 of file sctp_lock_bsd.h.
◆ SCTP_INP_WUNLOCK
#define SCTP_INP_WUNLOCK |
( |
|
_inp | ) |
|
Value: do { \
mtx_unlock(&(_inp)->inp_mtx); \
} while (0)
Definition at line 295 of file sctp_lock_bsd.h.
◆ SCTP_IP_PKTLOG_DESTROY
#define SCTP_IP_PKTLOG_DESTROY |
( |
| ) |
|
◆ SCTP_IP_PKTLOG_INIT
#define SCTP_IP_PKTLOG_INIT |
( |
| ) |
|
Value: do { \
"packetlog", MTX_DEF); \
} while (0)
Definition at line 214 of file sctp_lock_bsd.h.
◆ SCTP_IP_PKTLOG_LOCK
#define SCTP_IP_PKTLOG_LOCK |
( |
| ) |
|
◆ SCTP_IP_PKTLOG_UNLOCK
#define SCTP_IP_PKTLOG_UNLOCK |
( |
| ) |
|
◆ SCTP_IPI_ADDR_DESTROY
#define SCTP_IPI_ADDR_DESTROY |
( |
| ) |
|
◆ SCTP_IPI_ADDR_INIT
#define SCTP_IPI_ADDR_INIT |
( |
| ) |
|
◆ SCTP_IPI_ADDR_LOCK_ASSERT
#define SCTP_IPI_ADDR_LOCK_ASSERT |
( |
| ) |
|
◆ SCTP_IPI_ADDR_RLOCK
#define SCTP_IPI_ADDR_RLOCK |
( |
| ) |
|
◆ SCTP_IPI_ADDR_RUNLOCK
#define SCTP_IPI_ADDR_RUNLOCK |
( |
| ) |
|
◆ SCTP_IPI_ADDR_WLOCK
#define SCTP_IPI_ADDR_WLOCK |
( |
| ) |
|
◆ SCTP_IPI_ADDR_WLOCK_ASSERT
#define SCTP_IPI_ADDR_WLOCK_ASSERT |
( |
| ) |
|
◆ SCTP_IPI_ADDR_WUNLOCK
#define SCTP_IPI_ADDR_WUNLOCK |
( |
| ) |
|
◆ SCTP_IPI_COUNT_INIT
#define SCTP_IPI_COUNT_INIT |
( |
| ) |
|
◆ SCTP_IPI_ITERATOR_WQ_DESTROY
#define SCTP_IPI_ITERATOR_WQ_DESTROY |
( |
| ) |
|
Value: do { \
} while (0)
struct iterator_control sctp_it_ctl
struct mtx ipi_iterator_wq_mtx
Definition at line 202 of file sctp_lock_bsd.h.
◆ SCTP_IPI_ITERATOR_WQ_INIT
#define SCTP_IPI_ITERATOR_WQ_INIT |
( |
| ) |
|
Value: do { \
"sctp_it_wq", MTX_DEF); \
} while (0)
Definition at line 197 of file sctp_lock_bsd.h.
◆ SCTP_IPI_ITERATOR_WQ_LOCK
#define SCTP_IPI_ITERATOR_WQ_LOCK |
( |
| ) |
|
◆ SCTP_IPI_ITERATOR_WQ_UNLOCK
#define SCTP_IPI_ITERATOR_WQ_UNLOCK |
( |
| ) |
|
◆ SCTP_ITERATOR_LOCK
#define SCTP_ITERATOR_LOCK |
( |
| ) |
|
Value: do { \
("Own the iterator lock")); \
} while (0)
Definition at line 417 of file sctp_lock_bsd.h.
◆ SCTP_ITERATOR_LOCK_DESTROY
#define SCTP_ITERATOR_LOCK_DESTROY |
( |
| ) |
|
◆ SCTP_ITERATOR_LOCK_INIT
#define SCTP_ITERATOR_LOCK_INIT |
( |
| ) |
|
◆ SCTP_ITERATOR_UNLOCK
#define SCTP_ITERATOR_UNLOCK |
( |
| ) |
|
◆ SCTP_MCORE_DESTROY
#define SCTP_MCORE_DESTROY |
( |
|
cpstr | ) |
|
Value: do { \
if (mtx_owned(&(cpstr)->core_mtx)) { \
mtx_unlock(&(cpstr)->core_mtx); \
} \
mtx_destroy(&(cpstr)->core_mtx); \
} while (0)
Definition at line 147 of file sctp_lock_bsd.h.
◆ SCTP_MCORE_LOCK
#define SCTP_MCORE_LOCK |
( |
|
cpstr | ) |
|
Value: do { \
mtx_lock(&(cpstr)->core_mtx); \
} while (0)
Definition at line 154 of file sctp_lock_bsd.h.
◆ SCTP_MCORE_LOCK_INIT
#define SCTP_MCORE_LOCK_INIT |
( |
|
cpstr | ) |
|
Value: do { \
mtx_init(&(cpstr)->core_mtx, "sctp-cpulck","cpu_proc_lock", \
MTX_DEF | MTX_DUPOK); \
} while (0)
Definition at line 142 of file sctp_lock_bsd.h.
◆ SCTP_MCORE_QDESTROY
#define SCTP_MCORE_QDESTROY |
( |
|
cpstr | ) |
|
Value: do { \
if (mtx_owned(&(cpstr)->core_mtx)) { \
mtx_unlock(&(cpstr)->que_mtx); \
} \
mtx_destroy(&(cpstr)->que_mtx); \
} while (0)
Definition at line 127 of file sctp_lock_bsd.h.
◆ SCTP_MCORE_QLOCK
#define SCTP_MCORE_QLOCK |
( |
|
cpstr | ) |
|
Value: do { \
mtx_lock(&(cpstr)->que_mtx); \
} while (0)
Definition at line 134 of file sctp_lock_bsd.h.
◆ SCTP_MCORE_QLOCK_INIT
#define SCTP_MCORE_QLOCK_INIT |
( |
|
cpstr | ) |
|
Value: do { \
mtx_init(&(cpstr)->que_mtx, "sctp-mcore_queue","queue_lock", \
MTX_DEF | MTX_DUPOK); \
} while (0)
Definition at line 122 of file sctp_lock_bsd.h.
◆ SCTP_MCORE_QUNLOCK
#define SCTP_MCORE_QUNLOCK |
( |
|
cpstr | ) |
|
Value: do { \
mtx_unlock(&(cpstr)->que_mtx); \
} while (0)
Definition at line 138 of file sctp_lock_bsd.h.
◆ SCTP_MCORE_UNLOCK
#define SCTP_MCORE_UNLOCK |
( |
|
cpstr | ) |
|
Value: do { \
mtx_unlock(&(cpstr)->core_mtx); \
} while (0)
Definition at line 158 of file sctp_lock_bsd.h.
◆ SCTP_STATLOG_DESTROY
#define SCTP_STATLOG_DESTROY |
( |
| ) |
|
◆ SCTP_STATLOG_INIT_LOCK
#define SCTP_STATLOG_INIT_LOCK |
( |
| ) |
|
◆ SCTP_STATLOG_LOCK
#define SCTP_STATLOG_LOCK |
( |
| ) |
|
◆ SCTP_STATLOG_UNLOCK
#define SCTP_STATLOG_UNLOCK |
( |
| ) |
|
◆ SCTP_TCB_LOCK
#define SCTP_TCB_LOCK |
( |
|
_tcb | ) |
|
Value: do { \
mtx_lock(&(_tcb)->tcb_mtx); \
} while (0)
Definition at line 386 of file sctp_lock_bsd.h.
◆ SCTP_TCB_LOCK_ASSERT
#define SCTP_TCB_LOCK_ASSERT |
( |
|
_tcb | ) |
|
Value: do { \
KASSERT(mtx_owned(&(_tcb)->tcb_mtx), \
("Don't own TCB lock")); \
} while (0)
Definition at line 404 of file sctp_lock_bsd.h.
◆ SCTP_TCB_LOCK_DESTROY
#define SCTP_TCB_LOCK_DESTROY |
( |
|
_tcb | ) |
|
Value: do { \
mtx_destroy(&(_tcb)->tcb_mtx); \
} while (0)
Definition at line 375 of file sctp_lock_bsd.h.
◆ SCTP_TCB_LOCK_INIT
#define SCTP_TCB_LOCK_INIT |
( |
|
_tcb | ) |
|
Value: do { \
mtx_init(&(_tcb)->tcb_mtx, "sctp-tcb", "tcb", \
MTX_DEF | MTX_DUPOK); \
} while (0)
Definition at line 370 of file sctp_lock_bsd.h.
◆ SCTP_TCB_SEND_LOCK
#define SCTP_TCB_SEND_LOCK |
( |
|
_tcb | ) |
|
Value: do { \
mtx_lock(&(_tcb)->tcb_send_mtx); \
} while (0)
Definition at line 349 of file sctp_lock_bsd.h.
◆ SCTP_TCB_SEND_LOCK_ASSERT
#define SCTP_TCB_SEND_LOCK_ASSERT |
( |
|
_tcb | ) |
|
Value: do { \
KASSERT(mtx_owned(&(_tcb)->tcb_send_mtx), \
("Don't own TCB send lock")); \
} while (0)
Definition at line 357 of file sctp_lock_bsd.h.
◆ SCTP_TCB_SEND_LOCK_DESTROY
#define SCTP_TCB_SEND_LOCK_DESTROY |
( |
|
_tcb | ) |
|
Value: do { \
mtx_destroy(&(_tcb)->tcb_send_mtx); \
} while (0)
Definition at line 345 of file sctp_lock_bsd.h.
◆ SCTP_TCB_SEND_LOCK_INIT
#define SCTP_TCB_SEND_LOCK_INIT |
( |
|
_tcb | ) |
|
Value: do { \
mtx_init(&(_tcb)->tcb_send_mtx, "sctp-send-tcb", "tcbs", \
MTX_DEF | MTX_DUPOK); \
} while (0)
Definition at line 340 of file sctp_lock_bsd.h.
◆ SCTP_TCB_SEND_UNLOCK
#define SCTP_TCB_SEND_UNLOCK |
( |
|
_tcb | ) |
|
Value: do { \
mtx_unlock(&(_tcb)->tcb_send_mtx); \
} while (0)
Definition at line 353 of file sctp_lock_bsd.h.
◆ SCTP_TCB_TRYLOCK
#define SCTP_TCB_TRYLOCK |
( |
|
_tcb | ) |
mtx_trylock(&(_tcb)->tcb_mtx) |
◆ SCTP_TCB_UNLOCK
#define SCTP_TCB_UNLOCK |
( |
|
_tcb | ) |
|
Value: do { \
mtx_unlock(&(_tcb)->tcb_mtx); \
} while (0)
Definition at line 395 of file sctp_lock_bsd.h.
◆ SCTP_TCB_UNLOCK_IFOWNED
#define SCTP_TCB_UNLOCK_IFOWNED |
( |
|
_tcb | ) |
|
Value: do { \
if (mtx_owned(&(_tcb)->tcb_mtx)) \
mtx_unlock(&(_tcb)->tcb_mtx); \
} while (0)
Definition at line 399 of file sctp_lock_bsd.h.
◆ SCTP_WQ_ADDR_DESTROY
#define SCTP_WQ_ADDR_DESTROY |
( |
| ) |
|
◆ SCTP_WQ_ADDR_INIT
#define SCTP_WQ_ADDR_INIT |
( |
| ) |
|
Value: do { \
"sctp-addr-wq","sctp_addr_wq", MTX_DEF); \
} while (0)
Definition at line 428 of file sctp_lock_bsd.h.
◆ SCTP_WQ_ADDR_LOCK
#define SCTP_WQ_ADDR_LOCK |
( |
| ) |
|
◆ SCTP_WQ_ADDR_LOCK_ASSERT
#define SCTP_WQ_ADDR_LOCK_ASSERT |
( |
| ) |
|
Value: do { \
("Don't own the ADDR-WQ lock")); \
} while (0)
Definition at line 448 of file sctp_lock_bsd.h.
◆ SCTP_WQ_ADDR_UNLOCK
#define SCTP_WQ_ADDR_UNLOCK |
( |
| ) |
|
◆ __FBSDID()