sched: completion: Reinterpret the meaning of completion_done()
PATCH 1/1 sched: completion: Reinterpret the meaning of completion_done()
The most intuitive meaning of completion_done() is to see if a completion has been done, done=0 can only indicate that someone may be waiting.
Signed-off-by Wang Qing <[email protected]>
--- kernel/sched/completion.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/sched/completion.c +2 -2
@@ -304,10 +304,10 @@ bool try_wait_for_completion(struct completion *x)EXPORT_SYMBOL (try_wait_for_completion);/** -* completion_done - Test to see if a completion has any waiters +* completion_done - Test to see if a completion has been done * @x: completion structure * -* Return: 0 if there are waiters (wait_for_completion() in progress) +* Return: 0 if there may be waiters (wait_for_completion() in progress) * 1 if there are no waiters. * * Note, this will always return true if complete_all() was called on @X.
Signature · 1 line
2.27.0