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

Function stack_pages_gc

thread/thread.cpp:1495–1505  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1493 }
1494
1495 int stack_pages_gc(thread* th) {
1496 if (!th || th->vcpu != CURRENT->vcpu)
1497 LOG_ERROR_RETURN(EINVAL, -1, "target thread ` must be run on CURRENT vCPU", th);
1498 if (th->state == RUNNING) {
1499 auto next = AtomicRunQ().goto_next().to;
1500 switch_context_defer(th, next, do_stack_pages_gc, th);
1501 } else {
1502 do_stack_pages_gc(th);
1503 }
1504 return 0;
1505 }
1506
1507 template<typename T, typename PT = T*> inline
1508 T* indirect_lock(volatile PT* ppt, T* end)

Callers 1

testworkFunction · 0.85

Calls 4

AtomicRunQClass · 0.85
switch_context_deferFunction · 0.85
do_stack_pages_gcFunction · 0.85
goto_nextMethod · 0.80

Tested by 1

testworkFunction · 0.68