| 148 | } |
| 149 | |
| 150 | PCB *ProgramManager::allocatePCB() |
| 151 | { |
| 152 | for (int i = 0; i < MAX_PROGRAM_AMOUNT; ++i) |
| 153 | { |
| 154 | if (!PCB_SET_STATUS[i]) |
| 155 | { |
| 156 | PCB_SET_STATUS[i] = true; |
| 157 | return (PCB *)((int)PCB_SET + PCB_SIZE * i); |
| 158 | } |
| 159 | } |
| 160 | |
| 161 | return nullptr; |
| 162 | } |
| 163 | |
| 164 | void ProgramManager::releasePCB(PCB *program) |
| 165 | { |
nothing calls this directly
no outgoing calls
no test coverage detected