mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
rcutorture: Abstract torture-test initialization
This commit creates torture_init_begin() and torture_init_end() functions to abstract locking and allow the torture_type and verbose variables in kernel/torture.o to become static. With a bit more abstraction, fullstop_mutex will also become static. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
This commit is contained in:
parent
2e9e8081d2
commit
b5daa8f3b3
3 changed files with 40 additions and 15 deletions
|
@ -49,10 +49,6 @@ extern int fullstop;
|
|||
/* Protect fullstop transitions and spawning of kthreads. */
|
||||
extern struct mutex fullstop_mutex;
|
||||
|
||||
/* Common module parameters. */
|
||||
extern char *torture_type;
|
||||
extern bool verbose;
|
||||
|
||||
#define TORTURE_FLAG "-torture:"
|
||||
#define TOROUT_STRING(s) \
|
||||
pr_alert("%s" TORTURE_FLAG s "\n", torture_type)
|
||||
|
@ -89,4 +85,9 @@ void torture_shuffle_cleanup(void);
|
|||
/* Shutdown task absorption, for when the tasks cannot safely be killed. */
|
||||
void torture_shutdown_absorb(const char *title);
|
||||
|
||||
/* Initialization and cleanup. */
|
||||
|
||||
void torture_init_begin(char *ttype, bool v);
|
||||
void torture_init_end(void);
|
||||
|
||||
#endif /* __LINUX_TORTURE_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue