summaryrefslogtreecommitdiff
path: root/include/linux/torture.h
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2014-02-04 23:47:08 +0400
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2014-02-23 21:04:25 +0400
commit9c029b86098decd4660eec511b8d2d42da3e7dd9 (patch)
treea108dd697afee54ef25db8303aaa71c7b28e37aa /include/linux/torture.h
parent47cf29b9e721967aac95ebda9e50408219755852 (diff)
downloadlinux-9c029b86098decd4660eec511b8d2d42da3e7dd9.tar.xz
rcutorture: Abstract torture_stop_kthread()
Stopping of kthreads is not RCU-specific, so this commit abstracts out torture_stop_kthread(), saving a few lines of code in the process. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Diffstat (limited to 'include/linux/torture.h')
-rw-r--r--include/linux/torture.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/torture.h b/include/linux/torture.h
index 430cc3008628..7ccfb0a16728 100644
--- a/include/linux/torture.h
+++ b/include/linux/torture.h
@@ -91,9 +91,12 @@ bool torture_must_stop_irq(void);
void torture_kthread_stopping(char *title);
int _torture_create_kthread(int (*fn)(void *arg), void *arg, char *s, char *m,
char *f, struct task_struct **tp);
+void _torture_stop_kthread(char *m, struct task_struct **tp);
#define torture_create_kthread(n, arg, tp) \
_torture_create_kthread(n, (arg), #n, "Creating " #n " task", \
"Failed to create " #n, &(tp))
+#define torture_stop_kthread(n, tp) \
+ _torture_stop_kthread("Stopping " #n " task", &(tp))
#endif /* __LINUX_TORTURE_H */