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