aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/rwsem.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/rwsem.h')
-rw-r--r--include/linux/rwsem.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/rwsem.h b/include/linux/rwsem.h
index 2ea18a3def04..20a26b33f1c5 100644
--- a/include/linux/rwsem.h
+++ b/include/linux/rwsem.h
@@ -20,6 +20,10 @@
#include <linux/osq_lock.h>
#endif
+#ifdef CONFIG_PREEMPT_RT_FULL
+#include <linux/rwsem-rt.h>
+#else /* PREEMPT_RT_FULL */
+
/*
* For an uncontended rwsem, count and owner are the only fields a task
* needs to touch when acquiring the rwsem. So they are put next to each
@@ -109,6 +113,13 @@ static inline int rwsem_is_contended(struct rw_semaphore *sem)
return !list_empty(&sem->wait_list);
}
+#endif /* !PREEMPT_RT_FULL */
+
+/*
+ * The functions below are the same for all rwsem implementations including
+ * the RT specific variant.
+ */
+
/*
* lock for reading
*/