Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
MorsGames
GitHub Repository: MorsGames/sm64plus
Path: blob/master/lib/src/__osDequeueThread.c
7857 views
1
#include "libultra_internal.h"
2
3
// these don't feel like they belong here
4
// but it makes the most logical since there was printf data before
5
#ifndef AVOID_UB
6
OSThread *D_80334890 = NULL;
7
u32 D_80334894 = -1;
8
OSThread *D_80334898 = (OSThread *) &D_80334890;
9
OSThread *D_8033489C = (OSThread *) &D_80334890;
10
OSThread *D_803348A0 = NULL;
11
u32 D_803348A4 = 0; // UNKNOWN
12
#else
13
OSThread_ListHead D_80334890_fix = {NULL, -1, (OSThread *) &D_80334890_fix, (OSThread *) &D_80334890_fix, NULL, 0};
14
#endif
15
16
void __osDequeueThread(OSThread **queue, OSThread *thread) {
17
register OSThread **a2;
18
register OSThread *a3;
19
a2 = queue;
20
a3 = *a2;
21
while (a3 != NULL) {
22
if (a3 == thread) {
23
*a2 = thread->next;
24
return;
25
}
26
a2 = &a3->next;
27
a3 = *a2;
28
}
29
}
30
31