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

Function concurrent_exit_worker

tests/system_test/thread_group_test.cpp:181–193  ·  view source on GitHub ↗

* @brief 测试线程组成员同时退出 */

Source from the content-addressed store, hash-verified

179 * @brief 测试线程组成员同时退出
180 */
181void concurrent_exit_worker(void* arg) {
182 uint64_t thread_id = reinterpret_cast<uint64_t>(arg);
183
184 // 执行一些工作
185 for (int i = 0; i < 5; ++i) {
186 klog::Debug("ConcurrentExitWorker {}: iter={}", thread_id, i);
187 (void)sys_sleep(20);
188 }
189
190 klog::Info("ConcurrentExitWorker {}: exiting", thread_id);
191 g_thread_completed++;
192 sys_exit(0);
193}
194
195void test_thread_group_concurrent_exit(void* /*arg*/) {
196 klog::Info("=== Thread Group Concurrent Exit Test ===");

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected