[patch 1/6] lightweight robust futexes: arch defaults

From: Ingo Molnar
Date: Tue Feb 21 2006 - 03:46:25 EST



add placeholder futex_atomic_cmpxchg_inuser() implementations to every
architecture that supports futexes. It returns -ENOSYS.

Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Signed-off-by: Arjan van de Ven <arjan@xxxxxxxxxxxxx>
Acked-by: Ulrich Drepper <drepper@xxxxxxxxxx>

----

include/asm-frv/futex.h | 6 ++++++
include/asm-generic/futex.h | 6 ++++++
include/asm-i386/futex.h | 6 ++++++
include/asm-mips/futex.h | 6 ++++++
include/asm-powerpc/futex.h | 6 ++++++
include/asm-x86_64/futex.h | 6 ++++++
6 files changed, 36 insertions(+)

Index: linux-robust-list.q/include/asm-frv/futex.h
===================================================================
--- linux-robust-list.q.orig/include/asm-frv/futex.h
+++ linux-robust-list.q/include/asm-frv/futex.h
@@ -9,5 +9,11 @@

extern int futex_atomic_op_inuser(int encoded_op, int __user *uaddr);

+static inline int
+futex_atomic_cmpxchg_inuser(int __user *uaddr, int oldval, int newval)
+{
+ return -ENOSYS;
+}
+
#endif
#endif
Index: linux-robust-list.q/include/asm-generic/futex.h
===================================================================
--- linux-robust-list.q.orig/include/asm-generic/futex.h
+++ linux-robust-list.q/include/asm-generic/futex.h
@@ -49,5 +49,11 @@ futex_atomic_op_inuser (int encoded_op,
return ret;
}

+static inline int
+futex_atomic_cmpxchg_inuser(int __user *uaddr, int oldval, int newval)
+{
+ return -ENOSYS;
+}
+
#endif
#endif
Index: linux-robust-list.q/include/asm-i386/futex.h
===================================================================
--- linux-robust-list.q.orig/include/asm-i386/futex.h
+++ linux-robust-list.q/include/asm-i386/futex.h
@@ -104,5 +104,11 @@ futex_atomic_op_inuser (int encoded_op,
return ret;
}

+static inline int
+futex_atomic_cmpxchg_inuser(int __user *uaddr, int oldval, int newval)
+{
+ return -ENOSYS;
+}
+
#endif
#endif
Index: linux-robust-list.q/include/asm-mips/futex.h
===================================================================
--- linux-robust-list.q.orig/include/asm-mips/futex.h
+++ linux-robust-list.q/include/asm-mips/futex.h
@@ -99,5 +99,11 @@ futex_atomic_op_inuser (int encoded_op,
return ret;
}

+static inline int
+futex_atomic_cmpxchg_inuser(int __user *uaddr, int oldval, int newval)
+{
+ return -ENOSYS;
+}
+
#endif
#endif
Index: linux-robust-list.q/include/asm-powerpc/futex.h
===================================================================
--- linux-robust-list.q.orig/include/asm-powerpc/futex.h
+++ linux-robust-list.q/include/asm-powerpc/futex.h
@@ -81,5 +81,11 @@ static inline int futex_atomic_op_inuser
return ret;
}

+static inline int
+futex_atomic_cmpxchg_inuser(int __user *uaddr, int oldval, int newval)
+{
+ return -ENOSYS;
+}
+
#endif /* __KERNEL__ */
#endif /* _ASM_POWERPC_FUTEX_H */
Index: linux-robust-list.q/include/asm-x86_64/futex.h
===================================================================
--- linux-robust-list.q.orig/include/asm-x86_64/futex.h
+++ linux-robust-list.q/include/asm-x86_64/futex.h
@@ -94,5 +94,11 @@ futex_atomic_op_inuser (int encoded_op,
return ret;
}

+static inline int
+futex_atomic_cmpxchg_inuser(int __user *uaddr, int oldval, int newval)
+{
+ return -ENOSYS;
+}
+
#endif
#endif
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/