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