summaryrefslogtreecommitdiff
path: root/kernel/exit.c
diff options
context:
space:
mode:
authorDavidlohr Bueso <dave@stgolabs.net>2020-04-24 08:48:34 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2020-05-13 19:14:52 +0300
commit9d9a6ebfea329cadeda87544dceae01e9c27aaef (patch)
tree8f5b2862018ce5121af6e588584e513da2ce312b /kernel/exit.c
parentc9d64a1b2d0b9c81aef5e907bbeff549fd844d13 (diff)
downloadlinux-9d9a6ebfea329cadeda87544dceae01e9c27aaef.tar.xz
rcuwait: Let rcuwait_wake_up() return whether or not a task was awoken
Propagating the return value of wake_up_process() back to the caller can come in handy for future users, such as for statistics or accounting purposes. Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Davidlohr Bueso <dbueso@suse.de> Message-Id: <20200424054837.5138-3-dave@stgolabs.net> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'kernel/exit.c')
-rw-r--r--kernel/exit.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/kernel/exit.c b/kernel/exit.c
index 9f9015f3f6b0..f3beb637acf7 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -227,8 +227,9 @@ repeat:
goto repeat;
}
-void rcuwait_wake_up(struct rcuwait *w)
+int rcuwait_wake_up(struct rcuwait *w)
{
+ int ret = 0;
struct task_struct *task;
rcu_read_lock();
@@ -248,8 +249,10 @@ void rcuwait_wake_up(struct rcuwait *w)
task = rcu_dereference(w->task);
if (task)
- wake_up_process(task);
+ ret = wake_up_process(task);
rcu_read_unlock();
+
+ return ret;
}
EXPORT_SYMBOL_GPL(rcuwait_wake_up);