| 110 | } |
| 111 | |
| 112 | void program_exit() |
| 113 | { |
| 114 | PCB *thread = programManager.running; |
| 115 | thread->status = ProgramStatus::DEAD; |
| 116 | |
| 117 | if (thread->pid) |
| 118 | { |
| 119 | programManager.schedule(); |
| 120 | } |
| 121 | else |
| 122 | { |
| 123 | interruptManager.disableInterrupt(); |
| 124 | printf("halt\n"); |
| 125 | asm_halt(); |
| 126 | } |
| 127 | } |
| 128 | |
| 129 | PCB *ProgramManager::allocatePCB() |
| 130 | { |
nothing calls this directly
no test coverage detected