File: wip.h

package info (click to toggle)
linux 6.1.8-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,488,076 kB
  • sloc: ansic: 23,401,844; asm: 266,744; sh: 108,976; makefile: 49,705; python: 36,927; perl: 36,810; cpp: 6,044; yacc: 4,904; lex: 2,722; awk: 1,440; ruby: 25; sed: 5
file content (46 lines) | stat: -rw-r--r-- 1,030 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
 * Automatically generated C representation of wip automaton
 * For further information about this format, see kernel documentation:
 *   Documentation/trace/rv/deterministic_automata.rst
 */

enum states_wip {
	preemptive_wip = 0,
	non_preemptive_wip,
	state_max_wip
};

#define INVALID_STATE state_max_wip

enum events_wip {
	preempt_disable_wip = 0,
	preempt_enable_wip,
	sched_waking_wip,
	event_max_wip
};

struct automaton_wip {
	char *state_names[state_max_wip];
	char *event_names[event_max_wip];
	unsigned char function[state_max_wip][event_max_wip];
	unsigned char initial_state;
	bool final_states[state_max_wip];
};

static struct automaton_wip automaton_wip = {
	.state_names = {
		"preemptive",
		"non_preemptive"
	},
	.event_names = {
		"preempt_disable",
		"preempt_enable",
		"sched_waking"
	},
	.function = {
		{ non_preemptive_wip,      INVALID_STATE,      INVALID_STATE },
		{      INVALID_STATE,     preemptive_wip, non_preemptive_wip },
	},
	.initial_state = preemptive_wip,
	.final_states = { 1, 0 },
};