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.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/include/linux/rwsem.h b/include/linux/rwsem.h
index 496296d12d62..e8be18edb664 100644
--- a/include/linux/rwsem.h
+++ b/include/linux/rwsem.h
@@ -22,7 +22,18 @@ struct rw_semaphore;
#ifdef CONFIG_RWSEM_GENERIC_SPINLOCK
#include <linux/rwsem-spinlock.h> /* use a generic implementation */
#else
-#include <asm/rwsem.h> /* use an arch-specific implementation */
+/* All arch specific implementations share the same struct */
+struct rw_semaphore {
+ long count;
+ spinlock_t wait_lock;
+ struct list_head wait_list;
+#ifdef CONFIG_DEBUG_LOCK_ALLOC
+ struct lockdep_map dep_map;
+#endif
+};
+
+/* Include the arch specific part */
+#include <asm/rwsem.h>
#endif
/*