summaryrefslogtreecommitdiff
path: root/linux/kernel/locking/rwsem.h
diff options
context:
space:
mode:
Diffstat (limited to 'linux/kernel/locking/rwsem.h')
-rw-r--r--linux/kernel/locking/rwsem.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/linux/kernel/locking/rwsem.h b/linux/kernel/locking/rwsem.h
new file mode 100644
index 00000000..870ed9a5
--- /dev/null
+++ b/linux/kernel/locking/rwsem.h
@@ -0,0 +1,20 @@
+#ifdef CONFIG_RWSEM_SPIN_ON_OWNER
+static inline void rwsem_set_owner(struct rw_semaphore *sem)
+{
+ sem->owner = current;
+}
+
+static inline void rwsem_clear_owner(struct rw_semaphore *sem)
+{
+ sem->owner = NULL;
+}
+
+#else
+static inline void rwsem_set_owner(struct rw_semaphore *sem)
+{
+}
+
+static inline void rwsem_clear_owner(struct rw_semaphore *sem)
+{
+}
+#endif