1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-02-03 01:54:37 +00:00
oot/src/libultra_code/osSpTaskYielded.c

22 lines
360 B
C
Raw Normal View History

#include <global.h>
u32 osSpTaskYielded(OSTask* task) {
u32 ret;
u32 status;
status = __osSpGetStatus();
if (status & SP_STATUS_YIELDED) {
ret = OS_TASK_YIELDED;
} else {
ret = 0;
}
if (status & SP_STATUS_YIELD) {
task->t.flags |= ret;
task->t.flags &= ~OS_TASK_DP_WAIT;
}
return ret;
}