Untitled

mail@pastecode.io avatar
unknown
plain_text
2 months ago
266 B
2
Indexable
Never
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;
}
Leave a Comment