The first commit

This commit is contained in:
Banjo Kazooie
2022-07-15 17:09:41 -05:00
commit dd13d34074
1087 changed files with 391897 additions and 0 deletions

25
src/done/thread.c Normal file
View File

@@ -0,0 +1,25 @@
#include <os_internal.h>
#include "osint.h"
struct __osThreadTail __osThreadTail = {0, -1};
OSThread *__osRunQueue = (OSThread *)&__osThreadTail;
OSThread *__osActiveQueue = (OSThread *)&__osThreadTail;
OSThread *__osRunningThread = {0};
OSThread *__osFaultedThread = {0};
void __osDequeueThread(OSThread **queue, OSThread *t)
{
register OSThread *pred;
register OSThread *succ;
pred = (OSThread *)queue; //this is actually legit..
succ = pred->next;
while (succ != NULL)
{
if (succ == t)
{
pred->next = t->next;
return;
}
pred = succ;
succ = pred->next;
}
}