MCPcopy Create free account
hub / github.com/alibaba/PhotonLibOS / thread_pong

Function thread_pong

thread/test/test.cpp:334–344  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

332
333thread_local static int volatile running = 0;
334void* thread_pong(void* depth)
335{
336#ifdef RANDOMIZE_SP
337 if (depth)
338 return thread_pong((void*)((uint64_t)depth - 1));
339#endif
340 running = 1;
341 while (running)
342 thread_yield_fast();
343 return nullptr;
344}
345
346int DevNull(void*, int);
347void test_thread_switch(uint64_t nth, uint64_t stack_size)

Callers

nothing calls this directly

Calls 1

thread_yield_fastFunction · 0.85

Tested by

no test coverage detected