kernel/trace/rv/monitors/stall/stall.h

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

File Facts

System
Linux kernel
Corpus path
kernel/trace/rv/monitors/stall/stall.h
Extension
.h
Size
1557 bytes
Lines
82
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_stall {
	char *state_names[state_max_stall];
	char *event_names[event_max_stall];
	char *env_names[env_max_stall];
	unsigned char function[state_max_stall][event_max_stall];
	unsigned char initial_state;
	bool final_states[state_max_stall];
};

static const struct automaton_stall automaton_stall = {
	.state_names = {
		"dequeued",
		"enqueued",
		"running",
	},
	.event_names = {
		"sched_switch_in",
		"sched_switch_preempt",
		"sched_switch_wait",
		"sched_wakeup",
	},
	.env_names = {
		"clk",
	},
	.function = {
		{
			INVALID_STATE,
			INVALID_STATE,
			INVALID_STATE,
			enqueued_stall,
		},
		{
			running_stall,
			INVALID_STATE,
			INVALID_STATE,
			enqueued_stall,
		},
		{
			running_stall,
			enqueued_stall,
			dequeued_stall,
			running_stall,
		},
	},
	.initial_state = dequeued_stall,
	.final_states = { 1, 0, 0 },
};

Annotation

Implementation Notes