diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2014-01-28 15:58:22 -0800 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2014-02-23 09:01:06 -0800 |
commit | 2e9e8081d2e7a4efb582a240aa7fee991bbbabb0 (patch) | |
tree | 21b3850bb6568d7bc61b432305c20b2423de24d7 /include/linux/torture.h | |
parent | 3808dc9fab05913060626d7f0edd0f195cb9dcab (diff) |
rcutorture: Abstract torture_onoff()
Because online/offline torturing is not specific to RCU, this commit
abstracts it into the kernel/torture.c module to allow other torture
tests to use it.
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.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/torture.h b/include/linux/torture.h index 544a2c33c1a..be3694a702e 100644 --- a/include/linux/torture.h +++ b/include/linux/torture.h @@ -61,6 +61,18 @@ extern bool verbose; #define VERBOSE_TOROUT_ERRSTRING(s) \ do { if (verbose) pr_alert("%s" TORTURE_FLAG "!!! " s "\n", torture_type); } while (0) +/* Definitions for a non-string torture-test module parameter. */ +#define torture_parm(type, name, init, msg) \ + static type name = init; \ + module_param(name, type, 0444); \ + MODULE_PARM_DESC(name, msg); + +/* Definitions for online/offline exerciser. */ +int torture_onoff_init(long ooholdoff, long oointerval); +void torture_onoff_cleanup(void); +char *torture_onoff_stats(char *page); +bool torture_onoff_failures(void); + /* Low-rider random number generator. */ struct torture_random_state { unsigned long trs_state; |