MCPcopy Create free account
hub / github.com/Supercip971/WingOS / count

Method count

src/kernel/generic/cpu_tree.hpp:12–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10 bool is_leaf() const { return _children.len() == 0; }
11
12 size_t count() const
13 {
14 size_t c = is_leaf() ? 1 : 0;
15
16 for (auto child : _children)
17 {
18 c += child->count();
19 }
20
21 return c;
22 }
23
24 // may be changed for x86 for a faster algorithm
25 bool are_they_sibling(CoreId a, CoreId b) const

Callers 3

allocateMethod · 0.45
ownMethod · 0.45
releaseMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected