Decompile osGetThreadPri
This commit is contained in:
parent
f3e009c12c
commit
162cdd51ce
|
|
@ -6243,7 +6243,7 @@ u32 var80060930 = 0x00000000;
|
|||
u32 var80060934 = 0xffffffff;
|
||||
u32 var80060938 = (u32) &var80060930;
|
||||
u32 var8006093c = (u32) &var80060930;
|
||||
u32 var80060940 = 0x00000000;
|
||||
OSThread *__osRunningThread = NULL;
|
||||
u32 var80060944 = 0x00000000;
|
||||
u32 var80060948 = 0x00000000;
|
||||
u32 var8006094c = 0x00000000;
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ extern u32 var80060914;
|
|||
extern u32 var80060930;
|
||||
extern u32 var80060938;
|
||||
extern u32 var8006093c;
|
||||
extern u32 var80060940;
|
||||
extern OSThread *__osRunningThread;
|
||||
extern u32 var80060970;
|
||||
extern u32 var800609a0;
|
||||
extern u32 var800609c4;
|
||||
|
|
|
|||
|
|
@ -62,8 +62,8 @@ glabel __osException
|
|||
/* 352c: af400018 */ sw $zero,0x18($k0)
|
||||
/* 3530: 40086800 */ mfc0 $t0,$13
|
||||
/* 3534: 03404025 */ or $t0,$k0,$zero
|
||||
/* 3538: 3c1a8006 */ lui $k0,%hi(var80060940)
|
||||
/* 353c: 8f5a0940 */ lw $k0,%lo(var80060940)($k0)
|
||||
/* 3538: 3c1a8006 */ lui $k0,%hi(__osRunningThread)
|
||||
/* 353c: 8f5a0940 */ lw $k0,%lo(__osRunningThread)($k0)
|
||||
/* 3540: dd090020 */ ld $t1,0x20($t0)
|
||||
/* 3544: ff490020 */ sd $t1,0x20($k0)
|
||||
/* 3548: dd090118 */ ld $t1,0x118($t0)
|
||||
|
|
@ -505,8 +505,8 @@ glabel func00003ab8
|
|||
|
||||
GLOBAL_ASM(
|
||||
glabel __osEnqueueAndYield
|
||||
/* 3ba0: 3c058006 */ lui $a1,%hi(var80060940)
|
||||
/* 3ba4: 8ca50940 */ lw $a1,%lo(var80060940)($a1)
|
||||
/* 3ba0: 3c058006 */ lui $a1,%hi(__osRunningThread)
|
||||
/* 3ba4: 8ca50940 */ lw $a1,%lo(__osRunningThread)($a1)
|
||||
/* 3ba8: 40086000 */ mfc0 $t0,$12
|
||||
/* 3bac: 8cbb0018 */ lw $k1,0x18($a1)
|
||||
/* 3bb0: 35080002 */ ori $t0,$t0,0x2
|
||||
|
|
@ -618,8 +618,8 @@ glabel __osDispatchThread
|
|||
/* 3d10: 3c048006 */ lui $a0,%hi(var80060938)
|
||||
/* 3d14: 0c000f40 */ jal __osPopThread
|
||||
/* 3d18: 24840938 */ addiu $a0,$a0,%lo(var80060938)
|
||||
/* 3d1c: 3c018006 */ lui $at,%hi(var80060940)
|
||||
/* 3d20: ac220940 */ sw $v0,%lo(var80060940)($at)
|
||||
/* 3d1c: 3c018006 */ lui $at,%hi(__osRunningThread)
|
||||
/* 3d20: ac220940 */ sw $v0,%lo(__osRunningThread)($at)
|
||||
/* 3d24: 24080004 */ addiu $t0,$zero,0x4
|
||||
/* 3d28: a4480010 */ sh $t0,0x10($v0)
|
||||
/* 3d2c: 0040d025 */ or $k0,$v0,$zero
|
||||
|
|
|
|||
|
|
@ -82,8 +82,8 @@ glabel osStartThread
|
|||
/* 482c4: 0c000f2e */ jal __osEnqueueThread
|
||||
/* 482c8: 02202825 */ or $a1,$s1,$zero
|
||||
.L000482cc:
|
||||
/* 482cc: 3c188006 */ lui $t8,%hi(var80060940)
|
||||
/* 482d0: 8f180940 */ lw $t8,%lo(var80060940)($t8)
|
||||
/* 482cc: 3c188006 */ lui $t8,%hi(__osRunningThread)
|
||||
/* 482d0: 8f180940 */ lw $t8,%lo(__osRunningThread)($t8)
|
||||
/* 482d4: 17000005 */ bnez $t8,.L000482ec
|
||||
/* 482d8: 00000000 */ nop
|
||||
/* 482dc: 0c000f44 */ jal __osDispatchThread
|
||||
|
|
@ -91,10 +91,10 @@ glabel osStartThread
|
|||
/* 482e4: 1000000f */ b .L00048324
|
||||
/* 482e8: 00000000 */ nop
|
||||
.L000482ec:
|
||||
/* 482ec: 3c198006 */ lui $t9,%hi(var80060940)
|
||||
/* 482ec: 3c198006 */ lui $t9,%hi(__osRunningThread)
|
||||
/* 482f0: 3c098006 */ lui $t1,%hi(var80060938)
|
||||
/* 482f4: 8d290938 */ lw $t1,%lo(var80060938)($t1)
|
||||
/* 482f8: 8f390940 */ lw $t9,%lo(var80060940)($t9)
|
||||
/* 482f8: 8f390940 */ lw $t9,%lo(__osRunningThread)($t9)
|
||||
/* 482fc: 8d2a0004 */ lw $t2,0x4($t1)
|
||||
/* 48300: 8f280004 */ lw $t0,0x4($t9)
|
||||
/* 48304: 010a082a */ slt $at,$t0,$t2
|
||||
|
|
@ -161,8 +161,8 @@ glabel osStopThread
|
|||
/* 483cc: 10000010 */ b .L00048410
|
||||
/* 483d0: 00000000 */ nop
|
||||
.L000483d4:
|
||||
/* 483d4: 3c198006 */ lui $t9,%hi(var80060940)
|
||||
/* 483d8: 8f390940 */ lw $t9,%lo(var80060940)($t9)
|
||||
/* 483d4: 3c198006 */ lui $t9,%hi(__osRunningThread)
|
||||
/* 483d8: 8f390940 */ lw $t9,%lo(__osRunningThread)($t9)
|
||||
/* 483dc: 24180001 */ addiu $t8,$zero,0x1
|
||||
/* 483e0: 00002025 */ or $a0,$zero,$zero
|
||||
/* 483e4: 0c000ee8 */ jal __osEnqueueAndYield
|
||||
|
|
@ -200,8 +200,8 @@ glabel osSetThreadPri
|
|||
/* 4844c: 00408025 */ or $s0,$v0,$zero
|
||||
/* 48450: 15c00004 */ bnez $t6,.L00048464
|
||||
/* 48454: 00000000 */ nop
|
||||
/* 48458: 3c0f8006 */ lui $t7,%hi(var80060940)
|
||||
/* 4845c: 8def0940 */ lw $t7,%lo(var80060940)($t7)
|
||||
/* 48458: 3c0f8006 */ lui $t7,%hi(__osRunningThread)
|
||||
/* 4845c: 8def0940 */ lw $t7,%lo(__osRunningThread)($t7)
|
||||
/* 48460: afaf0028 */ sw $t7,0x28($sp)
|
||||
.L00048464:
|
||||
/* 48464: 8fb80028 */ lw $t8,0x28($sp)
|
||||
|
|
@ -210,8 +210,8 @@ glabel osSetThreadPri
|
|||
/* 48470: 13280020 */ beq $t9,$t0,.L000484f4
|
||||
/* 48474: 00000000 */ nop
|
||||
/* 48478: af080004 */ sw $t0,0x4($t8)
|
||||
/* 4847c: 3c0a8006 */ lui $t2,%hi(var80060940)
|
||||
/* 48480: 8d4a0940 */ lw $t2,%lo(var80060940)($t2)
|
||||
/* 4847c: 3c0a8006 */ lui $t2,%hi(__osRunningThread)
|
||||
/* 48480: 8d4a0940 */ lw $t2,%lo(__osRunningThread)($t2)
|
||||
/* 48484: 8fa90028 */ lw $t1,0x28($sp)
|
||||
/* 48488: 112a000c */ beq $t1,$t2,.L000484bc
|
||||
/* 4848c: 00000000 */ nop
|
||||
|
|
@ -227,10 +227,10 @@ glabel osSetThreadPri
|
|||
/* 484b4: 0c000f2e */ jal __osEnqueueThread
|
||||
/* 484b8: 01802825 */ or $a1,$t4,$zero
|
||||
.L000484bc:
|
||||
/* 484bc: 3c0d8006 */ lui $t5,%hi(var80060940)
|
||||
/* 484bc: 3c0d8006 */ lui $t5,%hi(__osRunningThread)
|
||||
/* 484c0: 3c0f8006 */ lui $t7,%hi(var80060938)
|
||||
/* 484c4: 8def0938 */ lw $t7,%lo(var80060938)($t7)
|
||||
/* 484c8: 8dad0940 */ lw $t5,%lo(var80060940)($t5)
|
||||
/* 484c8: 8dad0940 */ lw $t5,%lo(__osRunningThread)($t5)
|
||||
/* 484cc: 8df90004 */ lw $t9,0x4($t7)
|
||||
/* 484d0: 8dae0004 */ lw $t6,0x4($t5)
|
||||
/* 484d4: 01d9082a */ slt $at,$t6,$t9
|
||||
|
|
|
|||
|
|
@ -82,8 +82,8 @@ glabel osRecvMesg
|
|||
/* 48738: 10000036 */ b .L00048814
|
||||
/* 4873c: 2402ffff */ addiu $v0,$zero,-1
|
||||
.L00048740:
|
||||
/* 48740: 3c088006 */ lui $t0,%hi(var80060940)
|
||||
/* 48744: 8d080940 */ lw $t0,%lo(var80060940)($t0)
|
||||
/* 48740: 3c088006 */ lui $t0,%hi(__osRunningThread)
|
||||
/* 48744: 8d080940 */ lw $t0,%lo(__osRunningThread)($t0)
|
||||
/* 48748: 24190008 */ addiu $t9,$zero,0x8
|
||||
/* 4874c: a5190010 */ sh $t9,0x10($t0)
|
||||
/* 48750: 0c000ee8 */ jal __osEnqueueAndYield
|
||||
|
|
|
|||
|
|
@ -59,15 +59,13 @@ glabel func000488b0
|
|||
/* 488bc: 00000000 */ nop
|
||||
);
|
||||
|
||||
GLOBAL_ASM(
|
||||
glabel osGetThreadPri
|
||||
/* 488c0: 14800003 */ bnez $a0,.L000488d0
|
||||
/* 488c4: 00000000 */ nop
|
||||
/* 488c8: 3c048006 */ lui $a0,%hi(var80060940)
|
||||
/* 488cc: 8c840940 */ lw $a0,%lo(var80060940)($a0)
|
||||
.L000488d0:
|
||||
/* 488d0: 03e00008 */ jr $ra
|
||||
/* 488d4: 8c820004 */ lw $v0,0x4($a0)
|
||||
/* 488d8: 00000000 */ nop
|
||||
/* 488dc: 00000000 */ nop
|
||||
);
|
||||
extern OSThread *__osRunningThread;
|
||||
|
||||
OSPri osGetThreadPri(OSThread *thread)
|
||||
{
|
||||
if (thread == NULL) {
|
||||
thread = __osRunningThread;
|
||||
}
|
||||
|
||||
return thread->priority;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,8 +37,8 @@ glabel osSendMesg
|
|||
/* 48924: 24010001 */ addiu $at,$zero,0x1
|
||||
/* 48928: 1721000a */ bne $t9,$at,.L00048954
|
||||
/* 4892c: 00000000 */ nop
|
||||
/* 48930: 3c098006 */ lui $t1,%hi(var80060940)
|
||||
/* 48934: 8d290940 */ lw $t1,%lo(var80060940)($t1)
|
||||
/* 48930: 3c098006 */ lui $t1,%hi(__osRunningThread)
|
||||
/* 48934: 8d290940 */ lw $t1,%lo(__osRunningThread)($t1)
|
||||
/* 48938: 24080008 */ addiu $t0,$zero,0x8
|
||||
/* 4893c: a5280010 */ sh $t0,0x10($t1)
|
||||
/* 48940: 8fa40038 */ lw $a0,0x38($sp)
|
||||
|
|
|
|||
|
|
@ -310,8 +310,8 @@ glabel __osDisableInt
|
|||
/* 495d4: 8d480000 */ lw $t0,0x0($t2)
|
||||
/* 495d8: 3108ff00 */ andi $t0,$t0,0xff00
|
||||
/* 495dc: 110b000e */ beq $t0,$t3,.L00049618
|
||||
/* 495e0: 3c0a8006 */ lui $t2,%hi(var80060940)
|
||||
/* 495e4: 254a0940 */ addiu $t2,$t2,%lo(var80060940)
|
||||
/* 495e0: 3c0a8006 */ lui $t2,%hi(__osRunningThread)
|
||||
/* 495e4: 254a0940 */ addiu $t2,$t2,%lo(__osRunningThread)
|
||||
/* 495e8: 8d490118 */ lw $t1,0x118($t2)
|
||||
/* 495ec: 312aff00 */ andi $t2,$t1,0xff00
|
||||
/* 495f0: 01485024 */ and $t2,$t2,$t0
|
||||
|
|
|
|||
|
|
@ -473,8 +473,8 @@ glabel __osDestroyThread
|
|||
/* 4a270: 00408025 */ or $s0,$v0,$zero
|
||||
/* 4a274: 15c00005 */ bnez $t6,.L0004a28c
|
||||
/* 4a278: 00000000 */ nop
|
||||
/* 4a27c: 3c0f8006 */ lui $t7,%hi(var80060940)
|
||||
/* 4a280: 8def0940 */ lw $t7,%lo(var80060940)($t7)
|
||||
/* 4a27c: 3c0f8006 */ lui $t7,%hi(__osRunningThread)
|
||||
/* 4a280: 8def0940 */ lw $t7,%lo(__osRunningThread)($t7)
|
||||
/* 4a284: 10000009 */ b .L0004a2ac
|
||||
/* 4a288: afaf0038 */ sw $t7,0x38($sp)
|
||||
.L0004a28c:
|
||||
|
|
@ -518,8 +518,8 @@ glabel __osDestroyThread
|
|||
/* 4a310: 15c1fff5 */ bne $t6,$at,.L0004a2e8
|
||||
/* 4a314: 00000000 */ nop
|
||||
.L0004a318:
|
||||
/* 4a318: 3c198006 */ lui $t9,%hi(var80060940)
|
||||
/* 4a31c: 8f390940 */ lw $t9,%lo(var80060940)($t9)
|
||||
/* 4a318: 3c198006 */ lui $t9,%hi(__osRunningThread)
|
||||
/* 4a31c: 8f390940 */ lw $t9,%lo(__osRunningThread)($t9)
|
||||
/* 4a320: 8faf0038 */ lw $t7,0x38($sp)
|
||||
/* 4a324: 15f90003 */ bne $t7,$t9,.L0004a334
|
||||
/* 4a328: 00000000 */ nop
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@ glabel func00051c10
|
|||
/* 51c14: afbf001c */ sw $ra,0x1c($sp)
|
||||
/* 51c18: 0c01256c */ jal __osDisableInt
|
||||
/* 51c1c: afb00018 */ sw $s0,0x18($sp)
|
||||
/* 51c20: 3c0f8006 */ lui $t7,%hi(var80060940)
|
||||
/* 51c24: 8def0940 */ lw $t7,%lo(var80060940)($t7)
|
||||
/* 51c20: 3c0f8006 */ lui $t7,%hi(__osRunningThread)
|
||||
/* 51c24: 8def0940 */ lw $t7,%lo(__osRunningThread)($t7)
|
||||
/* 51c28: 240e0002 */ addiu $t6,$zero,0x2
|
||||
/* 51c2c: 3c048006 */ lui $a0,%hi(var80060938)
|
||||
/* 51c30: 00408025 */ or $s0,$v0,$zero
|
||||
|
|
|
|||
|
|
@ -53,8 +53,8 @@ glabel func00051ef0
|
|||
/* 51f30: 24010001 */ addiu $at,$zero,0x1
|
||||
/* 51f34: 1721000a */ bne $t9,$at,.L00051f60
|
||||
/* 51f38: 00000000 */ nop
|
||||
/* 51f3c: 3c098006 */ lui $t1,%hi(var80060940)
|
||||
/* 51f40: 8d290940 */ lw $t1,%lo(var80060940)($t1)
|
||||
/* 51f3c: 3c098006 */ lui $t1,%hi(__osRunningThread)
|
||||
/* 51f40: 8d290940 */ lw $t1,%lo(__osRunningThread)($t1)
|
||||
/* 51f44: 24080008 */ addiu $t0,$zero,0x8
|
||||
/* 51f48: a5280010 */ sh $t0,0x10($t1)
|
||||
/* 51f4c: 8fa40028 */ lw $a0,0x28($sp)
|
||||
|
|
|
|||
Loading…
Reference in New Issue