diff options
author | Nicholas Mc Guire <[email protected]> | 2015-01-23 12:41:47 +0100 |
---|---|---|
committer | Ingo Molnar <[email protected]> | 2015-02-04 07:57:37 +0100 |
commit | 7c34e3180a01c800a40bc8535654d5735802fc1b (patch) | |
tree | 7b2b9408d49b48b4aed1ae94619112da0569ee7e /net/unix/af_unix.c | |
parent | de30ec47302c101c7badc8fe687641fd75e596e7 (diff) |
sched/completion: Add lock-free checking of the blocking case
The "thread would block" case can be checked without grabbing ->wait.lock.
[ If the check does not return early then grab the lock and recheck.
A memory barrier is not needed as complete() and complete_all() imply
a barrier.
The ACCESS_ONCE() is needed for calls in a loop that, if inlined, could
optimize out the re-fetching of x->done. ]
Signed-off-by: Nicholas Mc Guire <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Cc: Linus Torvalds <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions