aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2009-05-05 19:21:40 +0200
committerThomas Gleixner <tglx@linutronix.de>2009-05-15 15:24:18 +0200
commitf1a11e0576c7a73d759d05d776692b2b2d37172b (patch)
tree3cb845c4cfd48cdbe0755d057c2698657fb965b5 /lib
parentb30505c81a9d4adea8b70ecff512b0216929b797 (diff)
futex: remove the wait queue
The waitqueue which is used in struct futex_q is a leftover from the futexfd implementation. There is no need to use a waitqueue at all, as the waiting task is the only user of it. The waitqueue just adds additional locking and a loop in the wake up path which both can be avoided. We have already a task reference in struct futex_q which is used for PI futexes. Use it for normal futexes as well and just wake up the task directly. The logic of signalling the futex wakeup via setting q->lock_ptr to NULL is kept with the difference that we set it NULL before doing the wakeup. This opens an exit race window vs. a non futex wake up of the to be woken up task, which we prevent with get_task_struct / put_task_struct on the waiter. [ Impact: simplification ] Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions