Messages in this thread | | | Date | Thu, 18 Dec 2008 11:44:08 +0100 | From | Ingo Molnar <> | Subject | Re: Update futex_q to clarify single waiter symmantics |
| |
* Darren Hart <dvhltc@us.ibm.com> wrote:
> From: Darren Hart <dvhltc@us.ibm.com> > > I've tripped over this a couple times. The futex_q uses a waiters list > to represent a single blocked task and then calles wake_up_all(). This > can lead to confusion in trying to understand the intent of the code, > which is to have a single futex_q for every task waiting on a futex. > This patch corrects the problem, using a single pointer to the waiting > task, and an appropriate call to wake_up, rather than wake_up_all. > > Compile and boot tested on an 8way x86_64 machine. > > Signed-off-by: Darren Hart <dvhltc@us.ibm.com> > --- > > kernel/futex.c | 11 ++++++----- > 1 files changed, 6 insertions(+), 5 deletions(-)
applied to tip/core/futexes, thanks Darren!
> - wake_up_all(&q->waiters); > + wake_up(&q->waiter);
yeah, the naming and the wake_up_all is a relic from the FUTEX_FD days - but we removed that earlier this year:
| commit 82af7aca56c67061420d618cc5a30f0fd4106b80 | Author: Eric Sesterhenn <snakebyte@gmx.de> | Date: Fri Jan 25 10:40:46 2008 +0100 | | Removal of FUTEX_FD
Ingo
| |