summaryrefslogtreecommitdiff
path: root/src/os/osYieldThread.c
blob: b669580c10888ba1b8ec0667449dc1e62c79d558 (plain)
1
2
3
4
5
6
7
8
9
#include "libultra_internal.h"
#include "osint.h"

void osYieldThread(void) {
    register u32 saveMask = __osDisableInt();
    __osRunningThread->state = OS_STATE_RUNNABLE;
    __osEnqueueAndYield(&__osRunQueue);
    __osRestoreInt(saveMask);
}