diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2014-01-29 00:58:22 +0100 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2014-02-23 18:01:06 +0100 |
commit | 2e9e8081d2e7a4efb582a240aa7fee991bbbabb0 (patch) | |
tree | 21b3850bb6568d7bc61b432305c20b2423de24d7 /include | |
parent | rcutorture: Abstract torture_shuffle() (diff) | |
download | linux-2e9e8081d2e7a4efb582a240aa7fee991bbbabb0.tar.xz linux-2e9e8081d2e7a4efb582a240aa7fee991bbbabb0.zip |
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')
-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 544a2c33c1ae..be3694a702e9 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; |