| 133 | } |
| 134 | |
| 135 | void program_exit() |
| 136 | { |
| 137 | PCB *thread = programManager.running; |
| 138 | thread->status = ProgramStatus::DEAD; |
| 139 | |
| 140 | if (thread->pid) |
| 141 | { |
| 142 | programManager.schedule(); |
| 143 | } |
| 144 | else |
| 145 | { |
| 146 | interruptManager.disableInterrupt(); |
| 147 | printf("halt\n"); |
| 148 | asm_halt(); |
| 149 | } |
| 150 | } |
| 151 | |
| 152 | PCB *ProgramManager::allocatePCB() |
| 153 | { |
nothing calls this directly
no test coverage detected