| 262 | } |
| 263 | |
| 264 | void Scheduler::hpUpdateTree(){ |
| 265 | |
| 266 | /* TODO: |
| 267 | The tree should only contain processes that are active during the |
| 268 | current block. ProcessNodes still in the future should be kept in a |
| 269 | separate list and added to the tree when their time comes. |
| 270 | In order to avoid scanning the whole list of future events, the events |
| 271 | should be sorted according to their activation time. It is probably |
| 272 | better to use absolute times rather than delta times so we don't |
| 273 | have to perform any arithmetic to update timing status of the events. |
| 274 | |
| 275 | We should also avoid allocating memory for future ProcessNodes until when they |
| 276 | are actually used. This will also allow us to use memory pools. |
| 277 | */ |
| 278 | |
| 279 | while(!mAddCommands.empty()){ |
| 280 | Command& c = mAddCommands.front(); |
| 281 | |
| 282 | switch(c.type){ |
| 283 | case Command::ADD_FIRST_CHILD: |
| 284 | c.object->addFirstChild(c.other); |
| 285 | break; |
| 286 | case Command::ADD_LAST_CHILD: |
| 287 | c.object->addLastChild(c.other); |
| 288 | break; |
| 289 | default:; |
| 290 | } |
| 291 | mAddCommands.pop(); |
| 292 | } |
| 293 | } |
| 294 | |
| 295 | void Scheduler::hpUpdateFreeList(){ |
| 296 |
nothing calls this directly
no test coverage detected