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

Function child_thread_exit_work

tests/system_test/exit_test.cpp:199–212  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

197// ---------------------------------------------------------------------------
198
199void child_thread_exit_work(void* arg) {
200 uint64_t thread_id = reinterpret_cast<uint64_t>(arg);
201
202 klog::Info("Thread {}: starting", thread_id);
203
204 for (int i = 0; i < 3; ++i) {
205 g_exit_test_counter++;
206 klog::Debug("Thread {}: working, iter={}", thread_id, i);
207 (void)sys_sleep(30);
208 }
209
210 klog::Info("Thread {}: exiting", thread_id);
211 sys_exit(static_cast<int>(thread_id));
212}
213
214void test_thread_exit(void* /*arg*/) {
215 klog::Info("=== Thread Exit Test ===");

Callers

nothing calls this directly

Calls 4

InfoFunction · 0.85
DebugFunction · 0.85
sys_sleepFunction · 0.85
sys_exitFunction · 0.85

Tested by

no test coverage detected