rcutorture: Abstract torture_shutdown()

Because auto-shutdown of torture testing is not specific to RCU,
this commit moves the auto-shutdown function 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-31 14:52:13 -08:00
parent 57a2fe90fc
commit e991dbc077
3 changed files with 92 additions and 59 deletions

View File

@@ -72,8 +72,10 @@ unsigned long torture_random(struct torture_random_state *trsp);
void torture_shuffle_task_register(struct task_struct *tp);
int torture_shuffle_init(long shuffint);
/* Shutdown task absorption, for when the tasks cannot safely be killed. */
/* Test auto-shutdown handling. */
void torture_shutdown_absorb(const char *title);
int torture_shutdown_init(int ssecs, void (*cleanup)(void));
void torture_shutdown_cleanup(void);
/* Task stuttering, which forces load/no-load transitions. */
void stutter_wait(const char *title);