summaryrefslogtreecommitdiff
path: root/include/linux/futex.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2006-07-29 05:17:57 +0200
committerLinus Torvalds <torvalds@g5.osdl.org>2006-07-28 21:02:00 -0700
commite3f2ddeac718c768fdac4b7fe69d465172f788a8 (patch)
tree5428532dc6c87710c35a71858425f6d726f0e44c /include/linux/futex.h
parent627371d73cdd04ed23fe098755b4f855138ad9e0 (diff)
[PATCH] pi-futex: robust-futex exit
Fix robust PI-futexes to be properly unlocked on unexpected exit. For this to work the kernel has to know whether a futex is a PI or a non-PI one, because the semantics are different. Since the space in relevant glibc data structures is extremely scarce, the best solution is to encode the 'PI' information in bit 0 of the robust list pointer. Existing (non-PI) glibc robust futexes have this bit always zero, so the ABI is kept. New glibc with PI-robust-futexes will set this bit. Further fixes from Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Ulrich Drepper <drepper@redhat.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/futex.h')
-rw-r--r--include/linux/futex.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/futex.h b/include/linux/futex.h
index 34c3a215f2cd..d097b5b72bc6 100644
--- a/include/linux/futex.h
+++ b/include/linux/futex.h
@@ -96,7 +96,8 @@ struct robust_list_head {
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(u32 __user *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);