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