Untitled

Anonymous
plain_text
04/27/2024 4:16 PM
356 B
15
Indexable
extern queue_t priority_queues[MAX_PRIO];

pcb_t *get_proc() {
    for (int prio = 0; prio < MAX_PRIO; prio++) {
        pcb_t *pcb = dequeue(&priority_queues[prio]);
        if (pcb != NULL) {
            return pcb;
        }
    }
    return NULL;
}
Editor is loading...
Leave a Comment