xref: /linux/kernel/trace/rv/monitors/wip/wip.h (revision 1fd1dc41724319406b0aff221a352a400b0ddfc5)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Automatically generated C representation of wip automaton
4  * For further information about this format, see kernel documentation:
5  *   Documentation/trace/rv/deterministic_automata.rst
6  */
7 
8 #define MONITOR_NAME wip
9 
10 enum states_wip {
11 	preemptive_wip,
12 	non_preemptive_wip,
13 	state_max_wip,
14 };
15 
16 #define INVALID_STATE state_max_wip
17 
18 enum events_wip {
19 	preempt_disable_wip,
20 	preempt_enable_wip,
21 	sched_waking_wip,
22 	event_max_wip,
23 };
24 
25 struct automaton_wip {
26 	char *state_names[state_max_wip];
27 	char *event_names[event_max_wip];
28 	unsigned char function[state_max_wip][event_max_wip];
29 	unsigned char initial_state;
30 	bool final_states[state_max_wip];
31 };
32 
33 static const struct automaton_wip automaton_wip = {
34 	.state_names = {
35 		"preemptive",
36 		"non_preemptive",
37 	},
38 	.event_names = {
39 		"preempt_disable",
40 		"preempt_enable",
41 		"sched_waking",
42 	},
43 	.function = {
44 		{ non_preemptive_wip,      INVALID_STATE,      INVALID_STATE },
45 		{      INVALID_STATE,     preemptive_wip, non_preemptive_wip },
46 	},
47 	.initial_state = preemptive_wip,
48 	.final_states = { 1, 0 },
49 };
50