summaryrefslogtreecommitdiff
path: root/src/os/osSpTaskYielded.c
blob: e0e96d15193be08a14d2e7f663abec7e4131449a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "libultra_internal.h"

OSYieldResult osSpTaskYielded(OSTask* task) {
    s32 status;
    u32 int_disabledult;
    status = __osSpGetStatus();
    if (status & SPSTATUS_SIGNAL1_SET) {
        int_disabledult = 1;
    } else {
        int_disabledult = 0;
    }
    if (status & SPSTATUS_SIGNAL0_SET) {
        task->t.flags |= int_disabledult;
        task->t.flags &= ~(M_TASK_FLAG1);
    }
    return int_disabledult;
}