diff options
| author | coco875 <59367621+coco875@users.noreply.github.com> | 2024-08-25 02:39:52 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-24 18:39:52 -0600 |
| commit | 848b31c01eed7b88a2d17b20a33de47f34c161b5 (patch) | |
| tree | cbe75dc66864f83dd2ce148f3e7a7a8889dc33e4 /src/os | |
| parent | e135178097f416bc54e36058e10d9b1c013929fd (diff) | |
Update decomp (#63)
* update libultra asm (#648)
* update libultra asm
* fix gcc __osThreadTail
---------
Co-authored-by: MegaMech <MegaMech@users.noreply.github.com>
* Document Vehicles (#641)
* start doc collision
* fix merge
* finish rename fonction related to vehicle
* document around waypoint of vehicle
* make some modification
* make some change and rename one
* copy_ to oldPos
* doc smoke ferry and train
* some rename
* fix some renaming
* precise index
* rename a funciton
* simplify waypoint_vehicles
* change some name
* change some name
* rename move_to_point_direction
* fix some conflict
* Update code_80005FD0.c
* Update code_80005FD0.h
---------
Co-authored-by: MegaMech <MegaMech@users.noreply.github.com>
* Label a save info loop (#645)
* save info
* more gcc progress
* fix a value and do a rename (#669)
* fix error of compilation
---------
Co-authored-by: MegaMech <MegaMech@users.noreply.github.com>
Diffstat (limited to 'src/os')
| -rw-r--r-- | src/os/__osDequeueThread.c | 12 | ||||
| -rw-r--r-- | src/os/libultra_internal.h | 26 | ||||
| -rw-r--r-- | src/os/osInitialize.c | 2 | ||||
| -rw-r--r-- | src/os/osint.h | 4 |
4 files changed, 18 insertions, 26 deletions
diff --git a/src/os/__osDequeueThread.c b/src/os/__osDequeueThread.c index 7f4287cdd..50ca5320e 100644 --- a/src/os/__osDequeueThread.c +++ b/src/os/__osDequeueThread.c @@ -1,15 +1,11 @@ #include "libultra_internal.h" -#ifndef AVOID_UB -OSThread *__osThreadTail = NULL; -u32 __osTest = -1; -OSThread *__osRunQueue = (OSThread *) &__osThreadTail; -OSThread *__osActiveQueue = (OSThread *) &__osThreadTail; +NO_REORDER OSThread *__osThreadTail = NULL; +NO_REORDER u32 __osTest = -1; +NO_REORDER OSThread *__osRunQueue = (OSThread *) &__osThreadTail; +NO_REORDER OSThread *__osActiveQueue = (OSThread *) &__osThreadTail; OSThread *__osRunningThread = NULL; OSThread *__osFaultedThread = NULL; -#else -OSThread_ListHead __osThreadTail_fix = {NULL, -1, (OSThread *) &__osThreadTail_fix, (OSThread *) &__osThreadTail_fix, NULL, 0}; -#endif void __osDequeueThread(OSThread **queue, OSThread *thread) { register OSThread **a2; diff --git a/src/os/libultra_internal.h b/src/os/libultra_internal.h index c241ca8df..f4bcc1138 100644 --- a/src/os/libultra_internal.h +++ b/src/os/libultra_internal.h @@ -3,10 +3,21 @@ #include <libultraship.h> #include "macros.h" +#ifdef TARGET_N64 +typedef struct __OSEventState +{ + OSMesgQueue *messageQueue; + OSMesg message; +} __OSEventState; +#endif + typedef struct __osThreadTail { - OSThread *next; - OSPri priority; + /* 0x00 */ OSThread *next; + /* 0x04 */ OSPri priority; + /* 0x08 */ OSThread *queue; + /* 0x0c */ OSThread *tlnext; + } OSThreadTail; /* @@ -24,23 +35,12 @@ typedef struct /*0x10*/ struct OSThread_s *unk10; /*0x14*/ u32 unk14; } OSThread_ListHead; -#ifdef AVOID_UB - -// Now fix the symbols to the new one. -extern OSThread_ListHead __osThreadTail_fix; -#define __osThreadTail __osThreadTail_fix.next -#define D_80334894 __osThreadTail_fix.priority -#define __osRunQueue __osThreadTail_fix.queue -#define __osActiveQueue __osThreadTail_fix.tlnext -#define __osRunningThread __osThreadTail_fix.unk10 -#else // Original OSThread_ListHead definitions extern OSThread *__osThreadTail; extern OSThread *__osActiveQueue; extern OSThread *__osRunQueue; extern OSThread *__osRunningThread; -#endif // Original EEPROM definitions extern u32 D_80365E00[15]; diff --git a/src/os/osInitialize.c b/src/os/osInitialize.c index 254b9a036..ff7be8bd3 100644 --- a/src/os/osInitialize.c +++ b/src/os/osInitialize.c @@ -15,7 +15,7 @@ typedef struct { u32 D_80194040; u64 osClockRate = 62500000; -u32 D_800EA5E8 = 0; +u32 __osShutdown = 0; u32 __OSGlobalIntMask = OS_IM_ALL; u32 D_800EA5F0 = 0; diff --git a/src/os/osint.h b/src/os/osint.h index 9e35c1edb..3396d8b2a 100644 --- a/src/os/osint.h +++ b/src/os/osint.h @@ -16,14 +16,10 @@ extern void __osTimerInterrupt(void); extern u32 __osProbeTLB(void *); extern int __osSpDeviceBusy(void); -#ifdef AVOID_UB -extern OSThread_ListHead __osThreadTail_fix; -#else extern OSThread *__osRunningThread; extern OSThread *__osActiveQueue; extern OSThread *__osFaultedThread; extern OSThread *__osRunQueue; -#endif extern OSTimer *__osTimerList; extern OSTimer __osBaseTimer; |
