mirror of
https://github.com/zeldaret/oot.git
synced 2025-02-03 01:54:37 +00:00
22 lines
360 B
C
22 lines
360 B
C
|
#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;
|
||
|
}
|