rcutorture: Abstract torture_shutdown_notify()

Because handling the race between rmmod and system shutdown is not
specific to RCU, this commit abstracts torture_shutdown_notify(),
placing this code into kernel/torture.c.  This change also allows
fullstop_mutex to be private to kernel/torture.c.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
This commit is contained in:
Paul E. McKenney 2014-01-30 15:37:19 -08:00
parent 3c626237eb
commit 4622b487ec
3 changed files with 24 additions and 30 deletions

View file

@ -46,8 +46,6 @@
#define FULLSTOP_SHUTDOWN 1 /* System shutdown with rcutorture running. */
#define FULLSTOP_RMMOD 2 /* Normal rmmod of rcutorture. */
extern int fullstop;
/* Protect fullstop transitions and spawning of kthreads. */
extern struct mutex fullstop_mutex;
#define TORTURE_FLAG "-torture:"
#define TOROUT_STRING(s) \