diff options
author | NeilBrown <[email protected]> | 2011-01-05 12:50:16 +1100 |
---|---|---|
committer | Ingo Molnar <[email protected]> | 2011-01-05 14:15:50 +0100 |
commit | 6bf4123760a5aece6e4829ce90b70b6ffd751d65 (patch) | |
tree | f7c34fba897b0a1270817c415b8c095958f59add /tools/perf/util/trace-event-scripting.c | |
parent | 27066fd484a32c80630136aa2b91c980f3198f9d (diff) |
sched: Change wait_for_completion_*_timeout() to return a signed long
wait_for_completion_*_timeout() can return:
0: if the wait timed out
-ve: if the wait was interrupted
+ve: if the completion was completed.
As they currently return an 'unsigned long', the last two cases
are not easily distinguished which can easily result in buggy
code, as is the case for the recently added
wait_for_completion_interruptible_timeout() call in
net/sunrpc/cache.c
So change them both to return 'long'. As MAX_SCHEDULE_TIMEOUT
is LONG_MAX, a large +ve return value should never overflow.
Signed-off-by: NeilBrown <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: J. Bruce Fields <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Linus Torvalds <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions