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

Function check

thread/test/test.cpp:100–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98}
99
100bool check(SleepQueue& sleepq)
101{
102 for (size_t i = 0; (i << 1) + 1 < sleepq.q.size(); i++) {
103 size_t l = (i << 1) + 1;
104 size_t r = l + 1;
105 assert(sleepq.q[i]->ts_wakeup <= sleepq.q[l]->ts_wakeup);
106 if (r < sleepq.q.size())
107 assert(sleepq.q[i]->ts_wakeup <= sleepq.q[r]->ts_wakeup);
108 }
109 return true;
110}
111
112void print_heap(SleepQueue& sleepq)
113{

Callers 1

sleepq_perfFunction · 0.70

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected