summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authornetchild <netchild@FreeBSD.org>2006-08-26 10:36:16 +0000
committernetchild <netchild@FreeBSD.org>2006-08-26 10:36:16 +0000
commite7f60f069c6fc085c75ee3416141a0ff36941c1c (patch)
tree05227221ea2dab8722bc64c792641588a1defbca /sys
parent61b3c1383ba3ed9b75e9597bce649e98be7ac73c (diff)
downloadFreeBSD-src-e7f60f069c6fc085c75ee3416141a0ff36941c1c.zip
FreeBSD-src-e7f60f069c6fc085c75ee3416141a0ff36941c1c.tar.gz
Correct the number of retries in a futex_wake() call.
Sponsored by: Google SoC 2006 Submitted by: rdivacky
Diffstat (limited to 'sys')
-rw-r--r--sys/compat/linux/linux_futex.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/compat/linux/linux_futex.c b/sys/compat/linux/linux_futex.c
index ec329ca..8e3b168 100644
--- a/sys/compat/linux/linux_futex.c
+++ b/sys/compat/linux/linux_futex.c
@@ -306,8 +306,12 @@ linux_sys_futex(struct thread *td, struct linux_sys_futex_args *args)
printf("second wakeup\n");
#endif
op_ret = 0;
- /* Linux always puts there 0 retries */
- op_ret += futex_wake(f2, 0, NULL);
+ /*
+ * Linux uses the address of the timespec parameter
+ * as the number of retries, so any large number will
+ * be ok.
+ */
+ op_ret += futex_wake(f2, 0x7fffffff, NULL);
ret += op_ret;
}
futex_put(f2);
OpenPOWER on IntegriCloud