|
@@ -34,6 +34,20 @@
|
|
#else
|
|
#else
|
|
#define raw_read_can_lock(l) read_can_lock(l)
|
|
#define raw_read_can_lock(l) read_can_lock(l)
|
|
#define raw_write_can_lock(l) write_can_lock(l)
|
|
#define raw_write_can_lock(l) write_can_lock(l)
|
|
|
|
+
|
|
|
|
+/*
|
|
|
|
+ * Some architectures can relax in favour of the CPU owning the lock.
|
|
|
|
+ */
|
|
|
|
+#ifndef arch_read_relax
|
|
|
|
+# define arch_read_relax(l) cpu_relax()
|
|
|
|
+#endif
|
|
|
|
+#ifndef arch_write_relax
|
|
|
|
+# define arch_write_relax(l) cpu_relax()
|
|
|
|
+#endif
|
|
|
|
+#ifndef arch_spin_relax
|
|
|
|
+# define arch_spin_relax(l) cpu_relax()
|
|
|
|
+#endif
|
|
|
|
+
|
|
/*
|
|
/*
|
|
* We build the __lock_function inlines here. They are too large for
|
|
* We build the __lock_function inlines here. They are too large for
|
|
* inlining all over the place, but here is only one user per function
|
|
* inlining all over the place, but here is only one user per function
|