MCPcopy Create free account
hub / github.com/LemonOSProject/LemonOS / clear

Method clear

Kernel/include/list.h:232–246  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

230 }
231
232 void clear() {
233 acquireLock(&lock);
234
235 ListNode<T>* node = front;
236 while (node && node->next) {
237 ListNode<T>* n = node->next;
238 kfree(node);
239 node = n;
240 }
241 front = NULL;
242 back = NULL;
243 num = 0;
244
245 releaseLock(&lock);
246 }
247
248 void add_back(const T& obj) {
249 acquireLock(&lock);

Callers 15

BuildTokensFunction · 0.45
PollMethod · 0.45
PaintMethod · 0.45
DoAnsiCSIFunction · 0.45
PrintCharFunction · 0.45
ParseMethod · 0.45
LoadTextMethod · 0.45
ClearItemsMethod · 0.45
RepopulateHandlesMethod · 0.45
GetProcessListFunction · 0.45
ClearItemsMethod · 0.45
DoAnsiCSIFunction · 0.45

Calls 1

kfreeFunction · 0.85

Tested by

no test coverage detected