Commit 5d75ddf
committed
Add intrusive node helpers for scheduler ready queues
This commit introduces two helper functions for intrusive list
usage, where each task embeds its own list node instead of relying
on per-operation malloc/free.
The new APIs allow the scheduler to manipulate ready-queue nodes
directly:
- list_pushback_node(): append an existing node to the end of the
list (before the tail sentinel) without allocating memory.
- list_remove_node(): remove a node from the list without freeing
it, allowing the caller to control the node's lifetime.
These helpers will be used by the upcoming O(1) scheduler
enqueue/dequeue paths, which require embedded list nodes stored in
tcb_t.1 parent d2dcce2 commit 5d75ddf
1 file changed
+37
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
103 | 121 | | |
104 | 122 | | |
105 | 123 | | |
| |||
134 | 152 | | |
135 | 153 | | |
136 | 154 | | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
137 | 174 | | |
138 | 175 | | |
139 | 176 | | |
| |||
0 commit comments