diff options
author | netchild <netchild@FreeBSD.org> | 2006-09-09 13:04:28 +0000 |
---|---|---|
committer | netchild <netchild@FreeBSD.org> | 2006-09-09 13:04:28 +0000 |
commit | 3c1d5d03513e65d935a37922285e7cd1faecdd5f (patch) | |
tree | 5e31825b36e4b0a678a81eaaf60e293e62b8d006 /sys | |
parent | a68eb477768801a706616496929f77e73c915c94 (diff) | |
download | FreeBSD-src-3c1d5d03513e65d935a37922285e7cd1faecdd5f.zip FreeBSD-src-3c1d5d03513e65d935a37922285e7cd1faecdd5f.tar.gz |
- don't wake every sleeper just the first one [1]
- remove debuging printf [2]
Submitted by: intron <mag@intron.ac> [1], rdivacky [2]
Diffstat (limited to 'sys')
-rw-r--r-- | sys/compat/linux/linux_futex.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/compat/linux/linux_futex.c b/sys/compat/linux/linux_futex.c index 8e3b168..513c42d 100644 --- a/sys/compat/linux/linux_futex.c +++ b/sys/compat/linux/linux_futex.c @@ -302,9 +302,6 @@ linux_sys_futex(struct thread *td, struct linux_sys_futex_args *args) ret = futex_wake(f, args->val, NULL); futex_put(f); if (op_ret > 0) { -#ifdef DEBUG - printf("second wakeup\n"); -#endif op_ret = 0; /* * Linux uses the address of the timespec parameter @@ -421,13 +418,13 @@ futex_wake(struct futex *f, int n, struct futex *newf) FUTEX_LOCK; TAILQ_FOREACH(wp, &f->f_waiting_proc, wp_list) { if (count <= n) { - wakeup(wp); + wakeup_one(wp); count++; } else { if (newf != NULL) { /* futex_put called after tsleep */ wp->wp_new_futex = futex_get(newf->f_uaddr, FUTEX_LOCKED); - wakeup(wp); + wakeup_one(wp); } } } |