kernel/trace/rv/monitors/sts/sts.h

Source file repositories/reference/linux-study-clean/kernel/trace/rv/monitors/sts/sts.h

File Facts

System
Linux kernel
Corpus path
kernel/trace/rv/monitors/sts/sts.h
Extension
.h
Size
2091 bytes
Lines
120
Domain
Core OS
Bucket
Scheduler, Processes, Timers, Sync, And Syscalls
Inferred role
Core OS: implementation source
Status
source implementation candidate

Why This File Exists

Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.

Dependency Surface

Detected Declarations

Annotated Snippet

struct automaton_sts {
	char *state_names[state_max_sts];
	char *event_names[event_max_sts];
	unsigned char function[state_max_sts][event_max_sts];
	unsigned char initial_state;
	bool final_states[state_max_sts];
};

static const struct automaton_sts automaton_sts = {
	.state_names = {
		"can_sched",
		"cant_sched",
		"disable_to_switch",
		"enable_to_exit",
		"in_irq",
		"scheduling",
		"switching",
	},
	.event_names = {
		"irq_disable",
		"irq_enable",
		"irq_entry",
		"sched_switch",
		"schedule_entry",
		"schedule_exit",
	},
	.function = {
		{
			cant_sched_sts,
			INVALID_STATE,
			INVALID_STATE,
			INVALID_STATE,
			scheduling_sts,
			INVALID_STATE,
		},
		{
			INVALID_STATE,
			can_sched_sts,
			cant_sched_sts,
			INVALID_STATE,
			INVALID_STATE,
			INVALID_STATE,
		},
		{
			INVALID_STATE,
			enable_to_exit_sts,
			in_irq_sts,
			switching_sts,
			INVALID_STATE,
			INVALID_STATE,
		},
		{
			enable_to_exit_sts,
			enable_to_exit_sts,
			enable_to_exit_sts,
			INVALID_STATE,
			INVALID_STATE,
			can_sched_sts,
		},
		{
			INVALID_STATE,
			scheduling_sts,
			in_irq_sts,
			INVALID_STATE,
			INVALID_STATE,
			INVALID_STATE,
		},
		{
			disable_to_switch_sts,
			INVALID_STATE,
			INVALID_STATE,
			INVALID_STATE,
			INVALID_STATE,
			INVALID_STATE,
		},
		{
			INVALID_STATE,
			enable_to_exit_sts,
			INVALID_STATE,
			INVALID_STATE,
			INVALID_STATE,
			INVALID_STATE,
		},
	},
	.initial_state = can_sched_sts,
	.final_states = { 1, 0, 0, 0, 0, 0, 0 },
};

Annotation

Implementation Notes