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

Method pop_front

thread/thread.cpp:391–404  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

389 }
390
391 thread* pop_front()
392 {
393 auto ret = q[0];
394 if (q.size() == 1) {
395 q.pop_back();
396 return ret;
397 }
398 q[0] = q.back();
399 q[0]->idx = 0;
400 q.pop_back();
401 down(0);
402 ret->idx = -1;
403 return ret;
404 }
405
406 int pop(thread *obj)
407 {

Callers 3

resume_threads_inlinedFunction · 0.45
ws_scan_standbyqFunction · 0.45
sleepq_perfFunction · 0.45

Calls 3

sizeMethod · 0.45
pop_backMethod · 0.45
backMethod · 0.45

Tested by 1

sleepq_perfFunction · 0.36