Stop Current Thread
Jump to navigation
Jump to search
# ROUTINE: STOP CURRENT THREAD # Mark current thread as not being in use, then switch threads 8014c958: 3c028017 lui r2,0x8017 8014c95c: 8c424038 lw r2,0x4038(r2) # Current thread ID (*0x80174038) 8014c960: 3c038016 lui r3,0x8016 8014c964: 8c635f98 lw r3,0x5f98(r3) # Thread array base pointer (*0x80165f98) 8014c968: 27bdffe8 addiu r29,r29,-0x0018 8014c96c: afbf0010 sw r31,0x0010(r29) 8014c970: 00021280 sll r2,r2,0x0a # (Current thread ID) * sizeof(thread) (*0x80174038 * 1024) 8014c974: 00431021 addu r2,r2,r3 # thread = (Current thread ID) * sizeof(thread) + (Thread array base pointer) 8014c978: ac400048 sw r0,0x0048(r2) # thread.IsRunning = 0 8014c97c: 0c0532a0 jal 0x8014ca80 # Switch To Next Thread (); 8014c980: ac40004c sw r0,0x004c(r2) # thread.TaskID = 0 8014c984: 8fbf0010 lw r31,0x0010(r29) 8014c988: 27bd0018 addiu r29,r29,0x0018 8014c98c: 03e00008 jr r31 8014c990: 00000000 nop