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

35
src/core1/os/recvmesg.c Normal file
View File

@@ -0,0 +1,35 @@
#include <ultra64.h>
#include "functions.h"
#include "variables.h"
extern OSThread *__osRunningThread;//_osRunningThread;
s32 osRecvMesg(OSMesgQueue *mq, OSMesg *msg, s32 flags)
{
register u32 saveMask;
saveMask = __osDisableInt();
while (MQ_IS_EMPTY(mq))
{
if (flags == OS_MESG_NOBLOCK)
{
__osRestoreInt(saveMask);
return -1;
}
__osRunningThread->state = OS_STATE_WAITING;
__osEnqueueAndYield(&mq->mtqueue);
}
if (msg != NULL)
{
*msg = mq->msg[mq->first];
}
mq->first = (mq->first + 1) % mq->msgCount;
mq->validCount--;
if (mq->fullqueue->next != NULL)
{
osStartThread(__osPopThread(&mq->fullqueue));
}
__osRestoreInt(saveMask);
return 0;
}