MCPcopy Create free account
hub / github.com/Simple-XX/SimpleKernel / sleeper_work

Function sleeper_work

tests/system_test/affinity_test.cpp:118–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116std::atomic<Pid> g_sleeper_pid{0};
117
118void sleeper_work(void* /*arg*/) {
119 auto* current = TaskManagerSingleton::instance().GetCurrentTask();
120 g_sleeper_pid.store(current->pid);
121 (void)sys_sleep(5000);
122 sys_exit(0);
123}
124
125void test_affinity_other_task(void* /*arg*/) {
126 klog::Info("=== Affinity Other Task Test ===");

Callers

nothing calls this directly

Calls 3

sys_sleepFunction · 0.85
sys_exitFunction · 0.85
GetCurrentTaskMethod · 0.80

Tested by

no test coverage detected