aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/futex.h
diff options
context:
space:
mode:
authorDarren Hart <dvhltc@us.ibm.com>2009-04-21 01:22:22 -0400
committerThomas Gleixner <tglx@linutronix.de>2009-04-30 05:41:35 -0400
commitba9c22f2c01cf5c88beed5a6b9e07d42e10bd358 (patch)
tree77664171b51bb6b03eac13ee946b6d894b2da01d /include/linux/futex.h
parenta5a2a0c7fa039c59619bc908b3b1ed24734d442a (diff)
futex: remove FUTEX_REQUEUE_PI (non CMP)
The new requeue PI futex op codes were modeled after the existing FUTEX_REQUEUE and FUTEX_CMP_REQUEUE calls. I was unaware at the time that FUTEX_REQUEUE was only around for compatibility reasons and shouldn't be used in new code. Ulrich Drepper elaborates on this in his Futexes are Tricky paper: http://people.redhat.com/drepper/futex.pdf. The deprecated call doesn't catch changes to the futex corresponding to the destination futex which can lead to deadlock. Therefor, I feel it best to remove FUTEX_REQUEUE_PI and leave only FUTEX_CMP_REQUEUE_PI as there are not yet any existing users of the API. This patch does change the OP code value of FUTEX_CMP_REQUEUE_PI to 12 from 13. Since my test case is the only known user of this API, I felt this was the right thing to do, rather than leave a hole in the enumeration. I chose to continue using the _CMP_ modifier in the OP code to make it explicit to the user that the test is being done. Builds, boots, and ran several hundred iterations requeue_pi.c. Signed-off-by: Darren Hart <dvhltc@us.ibm.com> LKML-Reference: <49ED580E.1050502@us.ibm.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/linux/futex.h')
-rw-r--r--include/linux/futex.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/include/linux/futex.h b/include/linux/futex.h
index b05519ca9e57..34956c8fdebf 100644
--- a/include/linux/futex.h
+++ b/include/linux/futex.h
@@ -24,8 +24,7 @@ union ktime;
24#define FUTEX_WAIT_BITSET 9 24#define FUTEX_WAIT_BITSET 9
25#define FUTEX_WAKE_BITSET 10 25#define FUTEX_WAKE_BITSET 10
26#define FUTEX_WAIT_REQUEUE_PI 11 26#define FUTEX_WAIT_REQUEUE_PI 11
27#define FUTEX_REQUEUE_PI 12 27#define FUTEX_CMP_REQUEUE_PI 12
28#define FUTEX_CMP_REQUEUE_PI 13
29 28
30#define FUTEX_PRIVATE_FLAG 128 29#define FUTEX_PRIVATE_FLAG 128
31#define FUTEX_CLOCK_REALTIME 256 30#define FUTEX_CLOCK_REALTIME 256
@@ -43,7 +42,6 @@ union ktime;
43#define FUTEX_WAKE_BITSET_PRIVATE (FUTEX_WAKE_BITS | FUTEX_PRIVATE_FLAG) 42#define FUTEX_WAKE_BITSET_PRIVATE (FUTEX_WAKE_BITS | FUTEX_PRIVATE_FLAG)
44#define FUTEX_WAIT_REQUEUE_PI_PRIVATE (FUTEX_WAIT_REQUEUE_PI | \ 43#define FUTEX_WAIT_REQUEUE_PI_PRIVATE (FUTEX_WAIT_REQUEUE_PI | \
45 FUTEX_PRIVATE_FLAG) 44 FUTEX_PRIVATE_FLAG)
46#define FUTEX_REQUEUE_PI_PRIVATE (FUTEX_REQUEUE_PI | FUTEX_PRIVATE_FLAG)
47#define FUTEX_CMP_REQUEUE_PI_PRIVATE (FUTEX_CMP_REQUEUE_PI | \ 45#define FUTEX_CMP_REQUEUE_PI_PRIVATE (FUTEX_CMP_REQUEUE_PI | \
48 FUTEX_PRIVATE_FLAG) 46 FUTEX_PRIVATE_FLAG)
49 47