summaryrefslogtreecommitdiff
path: root/lib/ultralib/src/os/yieldthread.c
blob: 976662b19e24c40b078251d442bb5300c7193acb (plain)
1
2
3
4
5
6
7
8
9
10
#include "PR/os_internal.h"
#include "PRinternal/osint.h"

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

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