| 127 | } |
| 128 | |
| 129 | PCB *ProgramManager::allocatePCB() |
| 130 | { |
| 131 | for (int i = 0; i < MAX_PROGRAM_AMOUNT; ++i) |
| 132 | { |
| 133 | if (!PCB_SET_STATUS[i]) |
| 134 | { |
| 135 | PCB_SET_STATUS[i] = true; |
| 136 | return (PCB *)((int)PCB_SET + PCB_SIZE * i); |
| 137 | } |
| 138 | } |
| 139 | |
| 140 | return nullptr; |
| 141 | } |
| 142 | |
| 143 | void ProgramManager::releasePCB(PCB *program) |
| 144 | { |
nothing calls this directly
no outgoing calls
no test coverage detected