Debian Codegraph @

kernel/trace/rv/monitors/sco/sco.h

raw
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3 * Automatically generated C representation of sco automaton
4 * For further information about this format, see kernel documentation:
5 * Documentation/trace/rv/deterministic_automata.rst
6 */
7
8 #define MONITOR_NAME sco
9
10 enum states_sco {
11 thread_context_sco,
12 scheduling_context_sco,
13 state_max_sco,
14 };
15
16 #define INVALID_STATE state_max_sco
17
18 enum events_sco {
19 sched_set_state_sco,
20 schedule_entry_sco,
21 schedule_exit_sco,
22 event_max_sco,
23 };
24
25 struct automaton_sco {
26 char *state_names[state_max_sco];
27 char *event_names[event_max_sco];
28 unsigned char function[state_max_sco][event_max_sco];
29 unsigned char initial_state;
30 bool final_states[state_max_sco];
31 };
32
33 static const struct automaton_sco automaton_sco = {
34 .state_names = {
35 "thread_context",
36 "scheduling_context",
37 },
38 .event_names = {
39 "sched_set_state",
40 "schedule_entry",
41 "schedule_exit",
42 },
43 .function = {
44 { thread_context_sco, scheduling_context_sco, INVALID_STATE },
45 { INVALID_STATE, INVALID_STATE, thread_context_sco },
46 },
47 .initial_state = thread_context_sco,
48 .final_states = { 1, 0 },
49 };