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

Function thread_yield_fast

thread/thread.cpp:1311–1314  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1309 }
1310
1311 inline void thread_yield_fast() {
1312 auto sw = AtomicRunQ().goto_next();
1313 switch_context(sw.from, sw.to);
1314 }
1315
1316 int thread_yield_to(thread* th) {
1317 if (unlikely(th == nullptr)) { // yield to any thread

Callers 2

thread_pongFunction · 0.85
test_thread_switchFunction · 0.85

Calls 3

AtomicRunQClass · 0.85
switch_contextFunction · 0.85
goto_nextMethod · 0.80

Tested by 2

thread_pongFunction · 0.68
test_thread_switchFunction · 0.68