mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-25 11:37:56 +00:00
provide additional convenience macros for inpcb locking (upgrade, downgrade, exclusive)
This commit is contained in:
parent
8f22a721c2
commit
82c33e73f2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=191125
@ -313,7 +313,10 @@ struct inpcbinfo {
|
||||
#define INP_TRY_WLOCK(inp) rw_try_wlock(&(inp)->inp_lock)
|
||||
#define INP_RUNLOCK(inp) rw_runlock(&(inp)->inp_lock)
|
||||
#define INP_WUNLOCK(inp) rw_wunlock(&(inp)->inp_lock)
|
||||
#define INP_LOCK_ASSERT(inp) rw_assert(&(inp)->inp_lock, RA_LOCKED)
|
||||
#define INP_TRY_UPGRADE(inp) rw_try_upgrade(&(inp)->inp_lock)
|
||||
#define INP_DOWNGRADE(inp) rw_downgrade(&(inp)->inp_lock)
|
||||
#define INP_WLOCKED(inp) rw_wowned(&(inp)->inp_lock)
|
||||
#define INP_LOCK_ASSERT(inp) rw_assert(&(inp)->inp_lock, RA_LOCKED)
|
||||
#define INP_RLOCK_ASSERT(inp) rw_assert(&(inp)->inp_lock, RA_RLOCKED)
|
||||
#define INP_WLOCK_ASSERT(inp) rw_assert(&(inp)->inp_lock, RA_WLOCKED)
|
||||
#define INP_UNLOCK_ASSERT(inp) rw_assert(&(inp)->inp_lock, RA_UNLOCKED)
|
||||
|
Loading…
Reference in New Issue
Block a user