tools/sched_ext/scx_cpu0.c

Source file repositories/reference/linux-study-clean/tools/sched_ext/scx_cpu0.c

File Facts

System
Linux kernel
Corpus path
tools/sched_ext/scx_cpu0.c
Extension
.c
Size
2217 bytes
Lines
106
Domain
Support Tooling And Documentation
Bucket
tools
Inferred role
Support Tooling And Documentation: implementation source
Status
source implementation candidate

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

switch (opt) {
		case 'v':
			verbose = true;
			break;
		default:
			fprintf(stderr, help_fmt, basename(argv[0]));
			return opt != 'h';
		}
	}

	SCX_OPS_LOAD(skel, cpu0_ops, scx_cpu0, uei);
	link = SCX_OPS_ATTACH(skel, cpu0_ops, scx_cpu0);

	while (!exit_req && !UEI_EXITED(skel, uei)) {
		__u64 stats[2];

		read_stats(skel, stats);
		printf("local=%llu cpu0=%llu\n", stats[0], stats[1]);
		fflush(stdout);
		sleep(1);
	}

	bpf_link__destroy(link);
	ecode = UEI_REPORT(skel, uei);
	scx_cpu0__destroy(skel);

	if (UEI_ECODE_RESTART(ecode))
		goto restart;
	return 0;
}

Annotation

Implementation Notes