diff options
author | Pierre Peiffer <pierre.peiffer@bull.net> | 2007-05-09 05:35:02 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-09 15:30:55 -0400 |
commit | d0aa7a70bf03b9de9e995ab272293be1f7937822 (patch) | |
tree | 194b30b7b8374b946f166996cb99fb95eb3b7819 /kernel/futex_compat.c | |
parent | c19384b5b296905d4988c7c684ff540a0f9d65be (diff) |
futex_requeue_pi optimization
This patch provides the futex_requeue_pi functionality, which allows some
threads waiting on a normal futex to be requeued on the wait-queue of a
PI-futex.
This provides an optimization, already used for (normal) futexes, to be used
with the PI-futexes.
This optimization is currently used by the glibc in pthread_broadcast, when
using "normal" mutexes. With futex_requeue_pi, it can be used with
PRIO_INHERIT mutexes too.
Signed-off-by: Pierre Peiffer <pierre.peiffer@bull.net>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Ulrich Drepper <drepper@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/futex_compat.c')
-rw-r--r-- | kernel/futex_compat.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/futex_compat.c b/kernel/futex_compat.c index dff27c471ea6..338a9b489fbc 100644 --- a/kernel/futex_compat.c +++ b/kernel/futex_compat.c | |||
@@ -156,7 +156,8 @@ asmlinkage long compat_sys_futex(u32 __user *uaddr, int op, u32 val, | |||
156 | t = ktime_add(ktime_get(), t); | 156 | t = ktime_add(ktime_get(), t); |
157 | tp = &t; | 157 | tp = &t; |
158 | } | 158 | } |
159 | if (op == FUTEX_REQUEUE || op == FUTEX_CMP_REQUEUE) | 159 | if (op == FUTEX_REQUEUE || op == FUTEX_CMP_REQUEUE |
160 | || op == FUTEX_CMP_REQUEUE_PI) | ||
160 | val2 = (int) (unsigned long) utime; | 161 | val2 = (int) (unsigned long) utime; |
161 | 162 | ||
162 | return do_futex(uaddr, op, val, tp, uaddr2, val2, val3); | 163 | return do_futex(uaddr, op, val, tp, uaddr2, val2, val3); |