summaryrefslogtreecommitdiffstats
path: root/include/sys
diff options
context:
space:
mode:
authorOlaf Faaland <[email protected]>2015-11-06 09:38:27 -0800
committerBrian Behlendorf <[email protected]>2015-12-22 10:20:29 -0800
commite0553a74adf1b1035e1ae25ca7feacacdeb93931 (patch)
tree09fc982f81a5f04e6d3b54db6333f0ef6128d400 /include/sys
parent76d5bf196cf6e5625f884a9ebbdaf53873a5a979 (diff)
Add lock types RW_NOLOCKDEP and MUTEX_NOLOCKDEP
Both lock types were introduced in SPL to allow some locks to be taken/released with linux lockdep turned off. See SPL commit for details. Add the new lock types to zfs_context.h to allow user space compilation. Depends on SPL commit 692ae8d SPL pull request refs/pull/480/head Signed-off-by: Olaf Faaland <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #3895
Diffstat (limited to 'include/sys')
-rw-r--r--include/sys/zfs_context.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/sys/zfs_context.h b/include/sys/zfs_context.h
index 4f7e3287f..2a749d840 100644
--- a/include/sys/zfs_context.h
+++ b/include/sys/zfs_context.h
@@ -274,6 +274,7 @@ typedef struct kmutex {
} kmutex_t;
#define MUTEX_DEFAULT 0
+#define MUTEX_NOLOCKDEP MUTEX_DEFAULT
#define MUTEX_HELD(m) ((m)->m_owner == curthread)
#define MUTEX_NOT_HELD(m) (!MUTEX_HELD(m))
@@ -305,6 +306,7 @@ typedef int krw_t;
#define RW_READER 0
#define RW_WRITER 1
#define RW_DEFAULT RW_READER
+#define RW_NOLOCKDEP RW_READER
#define RW_READ_HELD(x) ((x)->rw_readers > 0)
#define RW_WRITE_HELD(x) ((x)->rw_wr_owner == curthread)