remove "done" folders, label "bs/droneenter, bs/dronelook, and bs/dronevanish files and functions"

This commit is contained in:
Banjo Kazooie
2023-01-21 20:13:03 -06:00
parent 0ecaa54b4a
commit c004632915
190 changed files with 645 additions and 644 deletions

32
src/core1/os/stopthread.c Normal file
View File

@@ -0,0 +1,32 @@
#include <ultra64.h>
#include "functions.h"
#include "variables.h"
extern OSThread *__osRunningThread;
void osStopThread(OSThread *t)
{
register u32 saveMask = __osDisableInt();
register u16 state;
if (t == NULL)
{
state = OS_STATE_RUNNING;
}
else
{
state = t->state;
}
switch (state)
{
case OS_STATE_RUNNING:
__osRunningThread->state = OS_STATE_STOPPED;
__osEnqueueAndYield(NULL);
break;
case OS_STATE_RUNNABLE:
case OS_STATE_WAITING:
t->state = OS_STATE_STOPPED;
__osDequeueThread(t->queue, t);
break;
}
__osRestoreInt(saveMask);
}