mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 23:10:58 +00:00
freebsd glock assertions
assert we don't try to recurse on the glock Change-Id: Iecf0f869e4a541a0b5322def47c944dec310ae3e Reviewed-on: http://gerrit.openafs.org/1683 Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
parent
8844c33960
commit
73dd2783d7
@ -116,8 +116,17 @@ extern void osi_fbsd_free(void *p);
|
||||
vn_rdwr((rw),(gp),(base),(len),(offset),(segflg),(unit),(cred),(cred),(aresid), curthread)
|
||||
extern struct mtx afs_global_mtx;
|
||||
extern struct thread *afs_global_owner;
|
||||
#define AFS_GLOCK() mtx_lock(&afs_global_mtx)
|
||||
#define AFS_GUNLOCK() mtx_unlock(&afs_global_mtx)
|
||||
#define AFS_GLOCK() \
|
||||
do { \
|
||||
mtx_assert(&afs_global_mtx, (MA_NOTOWNED)); \
|
||||
mtx_lock(&afs_global_mtx); \
|
||||
mtx_assert(&afs_global_mtx, (MA_OWNED|MA_NOTRECURSED)); \
|
||||
} while (0)
|
||||
#define AFS_GUNLOCK() \
|
||||
do { \
|
||||
mtx_assert(&afs_global_mtx, (MA_OWNED|MA_NOTRECURSED)); \
|
||||
mtx_unlock(&afs_global_mtx); \
|
||||
} while (0)
|
||||
#define ISAFS_GLOCK() (mtx_owned(&afs_global_mtx))
|
||||
# if defined(AFS_FBSD80_ENV) && defined(WITNESS)
|
||||
# define osi_InitGlock() \
|
||||
|
Loading…
Reference in New Issue
Block a user