Decompile __scYield

This commit is contained in:
Ryan Dwyer 2021-01-25 22:14:27 +10:00
parent acd0fe0eef
commit 2cafbb46df
4 changed files with 11 additions and 21 deletions

View File

@ -2291,25 +2291,15 @@ glabel func00002d68nb
);
#endif
GLOBAL_ASM(
glabel __scYield
/* 2b70: 27bdffe8 */ addiu $sp,$sp,-24
/* 2b74: afbf0014 */ sw $ra,0x14($sp)
/* 2b78: 8c8200c8 */ lw $v0,0xc8($a0)
/* 2b7c: 24010001 */ addiu $at,$zero,0x1
/* 2b80: 8c4e0010 */ lw $t6,0x10($v0)
/* 2b84: 55c10006 */ bnel $t6,$at,.L00002ba0
/* 2b88: 8fbf0014 */ lw $ra,0x14($sp)
/* 2b8c: 8c4f0004 */ lw $t7,0x4($v0)
/* 2b90: 35f80010 */ ori $t8,$t7,0x10
/* 2b94: 0c012440 */ jal func00049100
/* 2b98: ac580004 */ sw $t8,0x4($v0)
/* 2b9c: 8fbf0014 */ lw $ra,0x14($sp)
.L00002ba0:
/* 2ba0: 27bd0018 */ addiu $sp,$sp,0x18
/* 2ba4: 03e00008 */ jr $ra
/* 2ba8: 00000000 */ nop
);
void __scYield(OSSched *sc)
{
if (sc->curRSPTask->list.t.type == M_GFXTASK) {
sc->curRSPTask->state |= 0x0010;
osSpTaskYield();
} else {
// empty
}
}
GLOBAL_ASM(
glabel __scSchedule

View File

@ -18,6 +18,7 @@ void __scHandleRetrace(OSSched *sc);
void __scAppendList(OSSched *sc, OSScTask *t);
void __scExec(OSSched *sc, OSScTask *sp, OSScTask *dp);
void __scMain(void *arg);
void __scYield(OSSched *sc);
struct bootbufferthing *func0000244c(void);
void func00002400(void);
void func000024e8(void);

View File

@ -4,7 +4,6 @@
#include "types.h"
u32 func000490b0(void);
u32 func00049100(void);
u32 func00049120(void);
#endif

View File

@ -36,7 +36,7 @@ glabel func000490b0
);
GLOBAL_ASM(
glabel func00049100
glabel osSpTaskYield
/* 49100: 27bdffe8 */ addiu $sp,$sp,-24
/* 49104: afbf0014 */ sw $ra,0x14($sp)
/* 49108: 0c012d40 */ jal __osSpSetStatus