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