FreeBSD kernel IPv4 code
sctp_lock_bsd.h File Reference
#include <sys/cdefs.h>
Include dependency graph for sctp_lock_bsd.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define _NETINET_SCTP_LOCK_BSD_H_
 
#define SCTP_IPI_COUNT_INIT()
 
#define SCTP_STATLOG_INIT_LOCK()
 
#define SCTP_STATLOG_DESTROY()
 
#define SCTP_STATLOG_LOCK()
 
#define SCTP_STATLOG_UNLOCK()
 
#define SCTP_INP_INFO_LOCK_INIT()
 
#define SCTP_INP_INFO_LOCK_DESTROY()
 
#define SCTP_INP_INFO_RLOCK()
 
#define SCTP_INP_INFO_WLOCK()
 
#define SCTP_INP_INFO_RUNLOCK()
 
#define SCTP_INP_INFO_WUNLOCK()
 
#define SCTP_INP_INFO_LOCK_ASSERT()
 
#define SCTP_INP_INFO_RLOCK_ASSERT()
 
#define SCTP_INP_INFO_WLOCK_ASSERT()
 
#define SCTP_MCORE_QLOCK_INIT(cpstr)
 
#define SCTP_MCORE_QDESTROY(cpstr)
 
#define SCTP_MCORE_QLOCK(cpstr)
 
#define SCTP_MCORE_QUNLOCK(cpstr)
 
#define SCTP_MCORE_LOCK_INIT(cpstr)
 
#define SCTP_MCORE_DESTROY(cpstr)
 
#define SCTP_MCORE_LOCK(cpstr)
 
#define SCTP_MCORE_UNLOCK(cpstr)
 
#define SCTP_IPI_ADDR_INIT()
 
#define SCTP_IPI_ADDR_DESTROY()
 
#define SCTP_IPI_ADDR_RLOCK()
 
#define SCTP_IPI_ADDR_WLOCK()
 
#define SCTP_IPI_ADDR_RUNLOCK()
 
#define SCTP_IPI_ADDR_WUNLOCK()
 
#define SCTP_IPI_ADDR_LOCK_ASSERT()
 
#define SCTP_IPI_ADDR_WLOCK_ASSERT()
 
#define SCTP_IPI_ITERATOR_WQ_INIT()
 
#define SCTP_IPI_ITERATOR_WQ_DESTROY()
 
#define SCTP_IPI_ITERATOR_WQ_LOCK()
 
#define SCTP_IPI_ITERATOR_WQ_UNLOCK()
 
#define SCTP_IP_PKTLOG_INIT()
 
#define SCTP_IP_PKTLOG_DESTROY()
 
#define SCTP_IP_PKTLOG_LOCK()
 
#define SCTP_IP_PKTLOG_UNLOCK()
 
#define SCTP_INP_READ_INIT(_inp)
 
#define SCTP_INP_READ_DESTROY(_inp)
 
#define SCTP_INP_READ_LOCK(_inp)
 
#define SCTP_INP_READ_UNLOCK(_inp)
 
#define SCTP_INP_LOCK_INIT(_inp)
 
#define SCTP_INP_LOCK_DESTROY(_inp)
 
#define SCTP_INP_LOCK_CONTENDED(_inp)    ((_inp)->inp_mtx.mtx_lock & MTX_CONTESTED)
 
#define SCTP_INP_READ_CONTENDED(_inp)    ((_inp)->inp_rdata_mtx.mtx_lock & MTX_CONTESTED)
 
#define SCTP_INP_RLOCK(_inp)
 
#define SCTP_INP_WLOCK(_inp)
 
#define SCTP_INP_RUNLOCK(_inp)
 
#define SCTP_INP_WUNLOCK(_inp)
 
#define SCTP_INP_RLOCK_ASSERT(_inp)
 
#define SCTP_INP_WLOCK_ASSERT(_inp)
 
#define SCTP_INP_INCR_REF(_inp)   atomic_add_int(&((_inp)->refcount), 1)
 
#define SCTP_INP_DECR_REF(_inp)   atomic_add_int(&((_inp)->refcount), -1)
 
#define SCTP_ASOC_CREATE_LOCK_INIT(_inp)
 
#define SCTP_ASOC_CREATE_LOCK_DESTROY(_inp)
 
#define SCTP_ASOC_CREATE_LOCK(_inp)
 
#define SCTP_ASOC_CREATE_UNLOCK(_inp)
 
#define SCTP_ASOC_CREATE_LOCK_CONTENDED(_inp)    ((_inp)->inp_create_mtx.mtx_lock & MTX_CONTESTED)
 
#define SCTP_TCB_SEND_LOCK_INIT(_tcb)
 
#define SCTP_TCB_SEND_LOCK_DESTROY(_tcb)
 
#define SCTP_TCB_SEND_LOCK(_tcb)
 
#define SCTP_TCB_SEND_UNLOCK(_tcb)
 
#define SCTP_TCB_SEND_LOCK_ASSERT(_tcb)
 
#define SCTP_TCB_LOCK_INIT(_tcb)
 
#define SCTP_TCB_LOCK_DESTROY(_tcb)
 
#define SCTP_TCB_LOCK(_tcb)
 
#define SCTP_TCB_TRYLOCK(_tcb)    mtx_trylock(&(_tcb)->tcb_mtx)
 
#define SCTP_TCB_UNLOCK(_tcb)
 
#define SCTP_TCB_UNLOCK_IFOWNED(_tcb)
 
#define SCTP_TCB_LOCK_ASSERT(_tcb)
 
#define SCTP_ITERATOR_LOCK_INIT()
 
#define SCTP_ITERATOR_LOCK_DESTROY()
 
#define SCTP_ITERATOR_LOCK()
 
#define SCTP_ITERATOR_UNLOCK()
 
#define SCTP_WQ_ADDR_INIT()
 
#define SCTP_WQ_ADDR_DESTROY()
 
#define SCTP_WQ_ADDR_LOCK()
 
#define SCTP_WQ_ADDR_UNLOCK()
 
#define SCTP_WQ_ADDR_LOCK_ASSERT()
 
#define SCTP_INCR_EP_COUNT()
 
#define SCTP_DECR_EP_COUNT()
 
#define SCTP_INCR_ASOC_COUNT()
 
#define SCTP_DECR_ASOC_COUNT()
 
#define SCTP_INCR_LADDR_COUNT()
 
#define SCTP_DECR_LADDR_COUNT()
 
#define SCTP_INCR_RADDR_COUNT()
 
#define SCTP_DECR_RADDR_COUNT()
 
#define SCTP_INCR_CHK_COUNT()
 
#define SCTP_DECR_CHK_COUNT()
 
#define SCTP_INCR_READQ_COUNT()
 
#define SCTP_DECR_READQ_COUNT()
 
#define SCTP_INCR_STRMOQ_COUNT()
 
#define SCTP_DECR_STRMOQ_COUNT()
 

Functions

 __FBSDID ("$FreeBSD$")
 

Macro Definition Documentation

◆ _NETINET_SCTP_LOCK_BSD_H_

#define _NETINET_SCTP_LOCK_BSD_H_

Definition at line 39 of file 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)

Definition at line 337 of file sctp_lock_bsd.h.

◆ 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 { \
atomic_subtract_int(&SCTP_BASE_INFO(ipi_count_asoc), 1); \
} while (0)
#define SCTP_BASE_INFO(__m)
Definition: sctp_os_bsd.h:145

Definition at line 465 of file sctp_lock_bsd.h.

◆ SCTP_DECR_CHK_COUNT

#define SCTP_DECR_CHK_COUNT ( )
Value:
do { \
KASSERT(SCTP_BASE_INFO(ipi_count_chunk) > 0, \
("ipi_count_chunk would become negative")); \
if (SCTP_BASE_INFO(ipi_count_chunk) != 0) \
atomic_subtract_int(&SCTP_BASE_INFO(ipi_count_chunk), \
1); \
} while (0)

Definition at line 489 of file sctp_lock_bsd.h.

◆ SCTP_DECR_EP_COUNT

#define SCTP_DECR_EP_COUNT ( )
Value:
do { \
atomic_subtract_int(&SCTP_BASE_INFO(ipi_count_ep), 1); \
} while (0)

Definition at line 457 of file sctp_lock_bsd.h.

◆ SCTP_DECR_LADDR_COUNT

#define SCTP_DECR_LADDR_COUNT ( )
Value:
do { \
atomic_subtract_int(&SCTP_BASE_INFO(ipi_count_laddr), 1); \
} while (0)

Definition at line 473 of file sctp_lock_bsd.h.

◆ SCTP_DECR_RADDR_COUNT

#define SCTP_DECR_RADDR_COUNT ( )
Value:
do { \
atomic_subtract_int(&SCTP_BASE_INFO(ipi_count_raddr),1); \
} while (0)

Definition at line 481 of file sctp_lock_bsd.h.

◆ SCTP_DECR_READQ_COUNT

#define SCTP_DECR_READQ_COUNT ( )
Value:
do { \
atomic_subtract_int(&SCTP_BASE_INFO(ipi_count_readq), 1); \
} while (0)

Definition at line 501 of file sctp_lock_bsd.h.

◆ SCTP_DECR_STRMOQ_COUNT

#define SCTP_DECR_STRMOQ_COUNT ( )
Value:
do { \
atomic_subtract_int(&SCTP_BASE_INFO(ipi_count_strmoq), 1); \
} while (0)

Definition at line 509 of file sctp_lock_bsd.h.

◆ SCTP_INCR_ASOC_COUNT

#define SCTP_INCR_ASOC_COUNT ( )
Value:
do { \
atomic_add_int(&SCTP_BASE_INFO(ipi_count_asoc), 1); \
} while (0)

Definition at line 461 of file sctp_lock_bsd.h.

◆ SCTP_INCR_CHK_COUNT

#define SCTP_INCR_CHK_COUNT ( )
Value:
do { \
atomic_add_int(&SCTP_BASE_INFO(ipi_count_chunk), 1); \
} while (0)

Definition at line 485 of file sctp_lock_bsd.h.

◆ SCTP_INCR_EP_COUNT

#define SCTP_INCR_EP_COUNT ( )
Value:
do { \
atomic_add_int(&SCTP_BASE_INFO(ipi_count_ep), 1); \
} while (0)

Definition at line 453 of file sctp_lock_bsd.h.

◆ SCTP_INCR_LADDR_COUNT

#define SCTP_INCR_LADDR_COUNT ( )
Value:
do { \
atomic_add_int(&SCTP_BASE_INFO(ipi_count_laddr), 1); \
} while (0)

Definition at line 469 of file sctp_lock_bsd.h.

◆ SCTP_INCR_RADDR_COUNT

#define SCTP_INCR_RADDR_COUNT ( )
Value:
do { \
atomic_add_int(&SCTP_BASE_INFO(ipi_count_raddr), 1); \
} while (0)

Definition at line 477 of file sctp_lock_bsd.h.

◆ SCTP_INCR_READQ_COUNT

#define SCTP_INCR_READQ_COUNT ( )
Value:
do { \
atomic_add_int(&SCTP_BASE_INFO(ipi_count_readq), 1); \
} while (0)

Definition at line 497 of file sctp_lock_bsd.h.

◆ SCTP_INCR_STRMOQ_COUNT

#define SCTP_INCR_STRMOQ_COUNT ( )
Value:
do { \
atomic_add_int(&SCTP_BASE_INFO(ipi_count_strmoq), 1); \
} while (0)

Definition at line 505 of file sctp_lock_bsd.h.

◆ SCTP_INP_DECR_REF

#define SCTP_INP_DECR_REF (   _inp)    atomic_add_int(&((_inp)->refcount), -1)

Definition at line 310 of file sctp_lock_bsd.h.

◆ SCTP_INP_INCR_REF

#define SCTP_INP_INCR_REF (   _inp)    atomic_add_int(&((_inp)->refcount), 1)

Definition at line 309 of file sctp_lock_bsd.h.

◆ SCTP_INP_INFO_LOCK_ASSERT

#define SCTP_INP_INFO_LOCK_ASSERT ( )
Value:
do { \
rw_assert(&SCTP_BASE_INFO(ipi_ep_mtx), RA_LOCKED); \
} while (0)

Definition at line 110 of file sctp_lock_bsd.h.

◆ SCTP_INP_INFO_LOCK_DESTROY

#define SCTP_INP_INFO_LOCK_DESTROY ( )
Value:
do { \
if (rw_wowned(&SCTP_BASE_INFO(ipi_ep_mtx))) { \
rw_wunlock(&SCTP_BASE_INFO(ipi_ep_mtx)); \
} \
rw_destroy(&SCTP_BASE_INFO(ipi_ep_mtx)); \
} while (0)

Definition at line 87 of file sctp_lock_bsd.h.

◆ SCTP_INP_INFO_LOCK_INIT

#define SCTP_INP_INFO_LOCK_INIT ( )
Value:
do { \
rw_init(&SCTP_BASE_INFO(ipi_ep_mtx), "sctp-info"); \
} while (0)

Definition at line 83 of file sctp_lock_bsd.h.

◆ SCTP_INP_INFO_RLOCK

#define SCTP_INP_INFO_RLOCK ( )
Value:
do { \
rw_rlock(&SCTP_BASE_INFO(ipi_ep_mtx)); \
} while (0)

Definition at line 94 of file sctp_lock_bsd.h.

◆ SCTP_INP_INFO_RLOCK_ASSERT

#define SCTP_INP_INFO_RLOCK_ASSERT ( )
Value:
do { \
rw_assert(&SCTP_BASE_INFO(ipi_ep_mtx), RA_RLOCKED); \
} while (0)

Definition at line 114 of file sctp_lock_bsd.h.

◆ SCTP_INP_INFO_RUNLOCK

#define SCTP_INP_INFO_RUNLOCK ( )
Value:
do { \
rw_runlock(&SCTP_BASE_INFO(ipi_ep_mtx)); \
} while (0)

Definition at line 102 of file sctp_lock_bsd.h.

◆ SCTP_INP_INFO_WLOCK

#define SCTP_INP_INFO_WLOCK ( )
Value:
do { \
rw_wlock(&SCTP_BASE_INFO(ipi_ep_mtx)); \
} while (0)

Definition at line 98 of file sctp_lock_bsd.h.

◆ SCTP_INP_INFO_WLOCK_ASSERT

#define SCTP_INP_INFO_WLOCK_ASSERT ( )
Value:
do { \
rw_assert(&SCTP_BASE_INFO(ipi_ep_mtx), RA_WLOCKED); \
} while (0)

Definition at line 118 of file sctp_lock_bsd.h.

◆ SCTP_INP_INFO_WUNLOCK

#define SCTP_INP_INFO_WUNLOCK ( )
Value:
do { \
rw_wunlock(&SCTP_BASE_INFO(ipi_ep_mtx)); \
} while (0)

Definition at line 106 of file sctp_lock_bsd.h.

◆ SCTP_INP_LOCK_CONTENDED

#define SCTP_INP_LOCK_CONTENDED (   _inp)     ((_inp)->inp_mtx.mtx_lock & MTX_CONTESTED)

Definition at line 263 of file sctp_lock_bsd.h.

◆ 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)

Definition at line 266 of file sctp_lock_bsd.h.

◆ 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 ( )
Value:
do { \
mtx_destroy(&SCTP_BASE_INFO(ipi_pktlog_mtx)); \
} while (0)

Definition at line 219 of file sctp_lock_bsd.h.

◆ SCTP_IP_PKTLOG_INIT

#define SCTP_IP_PKTLOG_INIT ( )
Value:
do { \
mtx_init(&SCTP_BASE_INFO(ipi_pktlog_mtx), "sctp-pktlog", \
"packetlog", MTX_DEF); \
} while (0)

Definition at line 214 of file sctp_lock_bsd.h.

◆ SCTP_IP_PKTLOG_LOCK

#define SCTP_IP_PKTLOG_LOCK ( )
Value:
do { \
mtx_lock(&SCTP_BASE_INFO(ipi_pktlog_mtx)); \
} while (0)

Definition at line 223 of file sctp_lock_bsd.h.

◆ SCTP_IP_PKTLOG_UNLOCK

#define SCTP_IP_PKTLOG_UNLOCK ( )
Value:
do { \
mtx_unlock(&SCTP_BASE_INFO(ipi_pktlog_mtx)); \
} while (0)

Definition at line 227 of file sctp_lock_bsd.h.

◆ SCTP_IPI_ADDR_DESTROY

#define SCTP_IPI_ADDR_DESTROY ( )
Value:
do { \
if (rw_wowned(&SCTP_BASE_INFO(ipi_addr_mtx))) { \
rw_wunlock(&SCTP_BASE_INFO(ipi_addr_mtx)); \
} \
rw_destroy(&SCTP_BASE_INFO(ipi_addr_mtx)); \
} while (0)

Definition at line 166 of file sctp_lock_bsd.h.

◆ SCTP_IPI_ADDR_INIT

#define SCTP_IPI_ADDR_INIT ( )
Value:
do { \
rw_init(&SCTP_BASE_INFO(ipi_addr_mtx), "sctp-addr"); \
} while (0)

Definition at line 162 of file sctp_lock_bsd.h.

◆ SCTP_IPI_ADDR_LOCK_ASSERT

#define SCTP_IPI_ADDR_LOCK_ASSERT ( )
Value:
do { \
rw_assert(&SCTP_BASE_INFO(ipi_addr_mtx), RA_LOCKED); \
} while (0)

Definition at line 189 of file sctp_lock_bsd.h.

◆ SCTP_IPI_ADDR_RLOCK

#define SCTP_IPI_ADDR_RLOCK ( )
Value:
do { \
rw_rlock(&SCTP_BASE_INFO(ipi_addr_mtx)); \
} while (0)

Definition at line 173 of file sctp_lock_bsd.h.

◆ SCTP_IPI_ADDR_RUNLOCK

#define SCTP_IPI_ADDR_RUNLOCK ( )
Value:
do { \
rw_runlock(&SCTP_BASE_INFO(ipi_addr_mtx)); \
} while (0)

Definition at line 181 of file sctp_lock_bsd.h.

◆ SCTP_IPI_ADDR_WLOCK

#define SCTP_IPI_ADDR_WLOCK ( )
Value:
do { \
rw_wlock(&SCTP_BASE_INFO(ipi_addr_mtx)); \
} while (0)

Definition at line 177 of file sctp_lock_bsd.h.

◆ SCTP_IPI_ADDR_WLOCK_ASSERT

#define SCTP_IPI_ADDR_WLOCK_ASSERT ( )
Value:
do { \
rw_assert(&SCTP_BASE_INFO(ipi_addr_mtx), RA_WLOCKED); \
} while (0)

Definition at line 193 of file sctp_lock_bsd.h.

◆ SCTP_IPI_ADDR_WUNLOCK

#define SCTP_IPI_ADDR_WUNLOCK ( )
Value:
do { \
rw_wunlock(&SCTP_BASE_INFO(ipi_addr_mtx)); \
} while (0)

Definition at line 185 of file sctp_lock_bsd.h.

◆ SCTP_IPI_COUNT_INIT

#define SCTP_IPI_COUNT_INIT ( )

Definition at line 76 of file sctp_lock_bsd.h.

◆ SCTP_IPI_ITERATOR_WQ_DESTROY

#define SCTP_IPI_ITERATOR_WQ_DESTROY ( )
Value:
do { \
} while (0)
struct iterator_control sctp_it_ctl
Definition: sctp_bsd_addr.c:76
struct mtx ipi_iterator_wq_mtx
Definition: sctp_structs.h:174

Definition at line 202 of file sctp_lock_bsd.h.

◆ SCTP_IPI_ITERATOR_WQ_INIT

#define SCTP_IPI_ITERATOR_WQ_INIT ( )
Value:
do { \
mtx_init(&sctp_it_ctl.ipi_iterator_wq_mtx, "sctp-it-wq", \
"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 ( )
Value:
do { \
} while (0)

Definition at line 206 of file sctp_lock_bsd.h.

◆ SCTP_IPI_ITERATOR_WQ_UNLOCK

#define SCTP_IPI_ITERATOR_WQ_UNLOCK ( )
Value:
do { \
} while (0)

Definition at line 210 of file sctp_lock_bsd.h.

◆ SCTP_ITERATOR_LOCK

#define SCTP_ITERATOR_LOCK ( )
Value:
do { \
KASSERT(!mtx_owned(&sctp_it_ctl.it_mtx), \
("Own the iterator lock")); \
mtx_lock(&sctp_it_ctl.it_mtx); \
} while (0)
struct mtx it_mtx
Definition: sctp_structs.h:175

Definition at line 417 of file sctp_lock_bsd.h.

◆ SCTP_ITERATOR_LOCK_DESTROY

#define SCTP_ITERATOR_LOCK_DESTROY ( )
Value:
do { \
mtx_destroy(&sctp_it_ctl.it_mtx); \
} while (0)

Definition at line 413 of file sctp_lock_bsd.h.

◆ SCTP_ITERATOR_LOCK_INIT

#define SCTP_ITERATOR_LOCK_INIT ( )
Value:
do { \
mtx_init(&sctp_it_ctl.it_mtx, "sctp-it", "iterator", MTX_DEF); \
} while (0)

Definition at line 409 of file sctp_lock_bsd.h.

◆ SCTP_ITERATOR_UNLOCK

#define SCTP_ITERATOR_UNLOCK ( )
Value:
do { \
mtx_unlock(&sctp_it_ctl.it_mtx); \
} while (0)

Definition at line 424 of file sctp_lock_bsd.h.

◆ 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 ( )

Definition at line 79 of file sctp_lock_bsd.h.

◆ SCTP_STATLOG_INIT_LOCK

#define SCTP_STATLOG_INIT_LOCK ( )

Definition at line 78 of file sctp_lock_bsd.h.

◆ SCTP_STATLOG_LOCK

#define SCTP_STATLOG_LOCK ( )

Definition at line 80 of file sctp_lock_bsd.h.

◆ SCTP_STATLOG_UNLOCK

#define SCTP_STATLOG_UNLOCK ( )

Definition at line 81 of file sctp_lock_bsd.h.

◆ 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)

Definition at line 392 of file sctp_lock_bsd.h.

◆ 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 ( )
Value:
do { \
if (mtx_owned(&SCTP_BASE_INFO(wq_addr_mtx))) { \
mtx_unlock(&SCTP_BASE_INFO(wq_addr_mtx)); \
} \
mtx_destroy(&SCTP_BASE_INFO(wq_addr_mtx)); \
} while (0)

Definition at line 433 of file sctp_lock_bsd.h.

◆ SCTP_WQ_ADDR_INIT

#define SCTP_WQ_ADDR_INIT ( )
Value:
do { \
mtx_init(&SCTP_BASE_INFO(wq_addr_mtx), \
"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 ( )
Value:
do { \
mtx_lock(&SCTP_BASE_INFO(wq_addr_mtx)); \
} while (0)

Definition at line 440 of file sctp_lock_bsd.h.

◆ SCTP_WQ_ADDR_LOCK_ASSERT

#define SCTP_WQ_ADDR_LOCK_ASSERT ( )
Value:
do { \
KASSERT(mtx_owned(&SCTP_BASE_INFO(wq_addr_mtx)), \
("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 ( )
Value:
do { \
mtx_unlock(&SCTP_BASE_INFO(wq_addr_mtx)); \
} while (0)

Definition at line 444 of file sctp_lock_bsd.h.

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )