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

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

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