summaryrefslogtreecommitdiff
path: root/src/libultra/os/yieldthread.c
blob: a0604f7183ac05e6f55bfc17f7b837330c5ffb67 (plain)
1
2
3
4
5
6
7
8
9
#include "ultra64.h"

void osYieldThread(void) {
    register u32 prevInt = __osDisableInt();

    __osRunningThread->state = OS_STATE_RUNNABLE;
    __osEnqueueAndYield(&__osRunQueue);
    __osRestoreInt(prevInt);
}