diff --git a/ld/libfiles.inc b/ld/libfiles.inc index d88b77f25..59bba94b3 100644 --- a/ld/libfiles.inc +++ b/ld/libfiles.inc @@ -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); \ diff --git a/src/lib/lib_48830.c b/src/lib/lib_48830.c index 13b22fb9d..97033171e 100644 --- a/src/lib/lib_48830.c +++ b/src/lib/lib_48830.c @@ -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; -} diff --git a/src/lib/ultra/io/dpsetstat.c b/src/lib/ultra/io/dpsetstat.c new file mode 100644 index 000000000..a51f56bea --- /dev/null +++ b/src/lib/ultra/io/dpsetstat.c @@ -0,0 +1,6 @@ +#include "libultra_internal.h" + +void osDpSetStatus(u32 data) +{ + IO_WRITE(DPC_STATUS_REG, data); +} diff --git a/src/lib/ultra/os/getthreadpri.c b/src/lib/ultra/os/getthreadpri.c new file mode 100644 index 000000000..84cca28ef --- /dev/null +++ b/src/lib/ultra/os/getthreadpri.c @@ -0,0 +1,12 @@ +#include + +extern OSThread *__osRunningThread; + +OSPri osGetThreadPri(OSThread *thread) +{ + if (thread == NULL) { + thread = __osRunningThread; + } + + return thread->priority; +}