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>
This commit is contained in:
@@ -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 */
|
||||
|
Reference in New Issue
Block a user