Decompile osDpSetStatus

This commit is contained in:
Ryan Dwyer 2021-01-26 19:08:00 +10:00
parent f30222117a
commit bc919f5a45
4 changed files with 20 additions and 19 deletions

View File

@ -93,6 +93,8 @@
build/ROMID/lib/ultra/os/setintmask.o (section); \
build/ROMID/lib/ultra/os/recvmesg.o (section); \
build/ROMID/lib/lib_48830.o (section); \
build/ROMID/lib/ultra/io/dpsetstat.o (section); \
build/ROMID/lib/ultra/os/getthreadpri.o (section); \
build/ROMID/lib/ultra/os/sendmesg.o (section); \
build/ROMID/lib/ultra/os/stoptimer.o (section); \
build/ROMID/lib/ultra/os/settimer.o (section); \

View File

@ -49,22 +49,3 @@ glabel osViGetNextFramebuffer
/* 488a8: 03e00008 */ jr $ra
/* 488ac: 27bd0028 */ addiu $sp,$sp,0x28
);
GLOBAL_ASM(
glabel osDpSetStatus
/* 488b0: 3c0ea410 */ lui $t6,0xa410
/* 488b4: 03e00008 */ jr $ra
/* 488b8: adc4000c */ sw $a0,0xc($t6)
/* 488bc: 00000000 */ nop
);
extern OSThread *__osRunningThread;
OSPri osGetThreadPri(OSThread *thread)
{
if (thread == NULL) {
thread = __osRunningThread;
}
return thread->priority;
}

View File

@ -0,0 +1,6 @@
#include "libultra_internal.h"
void osDpSetStatus(u32 data)
{
IO_WRITE(DPC_STATUS_REG, data);
}

View File

@ -0,0 +1,12 @@
#include <ultra64.h>
extern OSThread *__osRunningThread;
OSPri osGetThreadPri(OSThread *thread)
{
if (thread == NULL) {
thread = __osRunningThread;
}
return thread->priority;
}