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

Function thread_yield

thread/thread.cpp:1301–1309  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1299 }
1300
1301 int thread_yield()
1302 {
1303 RunQ rq;
1304 if_update_now();
1305 rq.current->error_number = 0;
1306 auto sw = AtomicRunQ(rq).goto_next();
1307 switch_context(sw.from, sw.to);
1308 return rq.current->error_number;
1309 }
1310
1311 inline void thread_yield_fast() {
1312 auto sw = AtomicRunQ().goto_next();

Callers 15

poll_engineFunction · 0.85
sync_signal_initFunction · 0.85
resume_libaio_requestersFunction · 0.85
TESTFunction · 0.85
TESTFunction · 0.85
taskFunction · 0.85
staskFunction · 0.85
handlerFunction · 0.85
TESTFunction · 0.85
do_pollMethod · 0.85
acceptMethod · 0.85
accept_loopMethod · 0.85

Calls 4

if_update_nowFunction · 0.85
AtomicRunQClass · 0.85
switch_contextFunction · 0.85
goto_nextMethod · 0.80

Tested by 15

TESTFunction · 0.68
TESTFunction · 0.68
taskFunction · 0.68
staskFunction · 0.68
handlerFunction · 0.68
TESTFunction · 0.68
TEST_FFunction · 0.68
TESTFunction · 0.68
heavy_completeFunction · 0.68
process_threadFunction · 0.68
TESTFunction · 0.68
test_with_idleFunction · 0.68