[PATCH] ACPI: fix cpufreq regression
[safe/jmp/linux-2.6] / include / linux / futex.h
index 20face6..3f153b4 100644 (file)
@@ -12,6 +12,9 @@
 #define FUTEX_REQUEUE          3
 #define FUTEX_CMP_REQUEUE      4
 #define FUTEX_WAKE_OP          5
+#define FUTEX_LOCK_PI          6
+#define FUTEX_UNLOCK_PI                7
+#define FUTEX_TRYLOCK_PI       8
 
 /*
  * Support for robust futexes: the kernel cleans up held futexes at
@@ -80,35 +83,35 @@ struct robust_list_head {
 #define FUTEX_OWNER_DIED       0x40000000
 
 /*
- * Reserved bit:
- */
-#define FUTEX_OWNER_PENDING    0x20000000
-
-/*
  * The rest of the robust-futex field is for the TID:
  */
-#define FUTEX_TID_MASK         0x1fffffff
+#define FUTEX_TID_MASK         0x3fffffff
 
 /*
- * A limit of one million locks held per thread (!) ought to be enough
- * for some time. This also protects against a deliberately circular
- * list. Not worth introducing an rlimit for this:
+ * This limit protects against a deliberately circular list.
+ * (Not worth introducing an rlimit for it)
  */
-#define ROBUST_LIST_LIMIT      1048576
+#define ROBUST_LIST_LIMIT      2048
 
-long do_futex(unsigned long uaddr, int op, int val,
-               unsigned long timeout, unsigned long uaddr2, int val2,
-               int val3);
+#ifdef __KERNEL__
+long do_futex(u32 __user *uaddr, int op, u32 val, unsigned long timeout,
+             u32 __user *uaddr2, u32 val2, u32 val3);
 
-extern int handle_futex_death(unsigned int *uaddr, struct task_struct *curr);
+extern int
+handle_futex_death(u32 __user *uaddr, struct task_struct *curr, int pi);
 
 #ifdef CONFIG_FUTEX
 extern void exit_robust_list(struct task_struct *curr);
+extern void exit_pi_state_list(struct task_struct *curr);
 #else
 static inline void exit_robust_list(struct task_struct *curr)
 {
 }
+static inline void exit_pi_state_list(struct task_struct *curr)
+{
+}
 #endif
+#endif /* __KERNEL__ */
 
 #define FUTEX_OP_SET           0       /* *(int *)UADDR2 = OPARG; */
 #define FUTEX_OP_ADD           1       /* *(int *)UADDR2 += OPARG; */