xref: /linux/kernel/trace/rv/monitors/wwnr/wwnr.h (revision 7ae9fb1b7ecbb5d85d07857943f677fd1a559b18)
1 /*
2  * Automatically generated C representation of wwnr automaton
3  * For further information about this format, see kernel documentation:
4  *   Documentation/trace/rv/deterministic_automata.rst
5  */
6 
7 enum states_wwnr {
8 	not_running_wwnr = 0,
9 	running_wwnr,
10 	state_max_wwnr
11 };
12 
13 #define INVALID_STATE state_max_wwnr
14 
15 enum events_wwnr {
16 	switch_in_wwnr = 0,
17 	switch_out_wwnr,
18 	wakeup_wwnr,
19 	event_max_wwnr
20 };
21 
22 struct automaton_wwnr {
23 	char *state_names[state_max_wwnr];
24 	char *event_names[event_max_wwnr];
25 	unsigned char function[state_max_wwnr][event_max_wwnr];
26 	unsigned char initial_state;
27 	bool final_states[state_max_wwnr];
28 };
29 
30 static const struct automaton_wwnr automaton_wwnr = {
31 	.state_names = {
32 		"not_running",
33 		"running"
34 	},
35 	.event_names = {
36 		"switch_in",
37 		"switch_out",
38 		"wakeup"
39 	},
40 	.function = {
41 		{       running_wwnr,      INVALID_STATE,   not_running_wwnr },
42 		{      INVALID_STATE,   not_running_wwnr,      INVALID_STATE },
43 	},
44 	.initial_state = not_running_wwnr,
45 	.final_states = { 1, 0 },
46 };
47