Files
Starship/src/libultra/os/createmesgqueue.c
T
Alejandro Javier Asenjo Nitti 52a8a12bea Match osCreateMesgQueue
2024-02-07 16:06:55 -03:00

19 lines
466 B
C

#include "PR/os_internal.h"
#include "PR/ultraerror.h"
#include "osint.h"
void osCreateMesgQueue(OSMesgQueue* mq, OSMesg* msg, s32 msgCount) {
#ifdef _DEBUG
if (msgCount <= 0) {
__osError(ERR_OSCREATEMESGQUEUE, 1, msgCount);
return;
}
#endif
mq->mtqueue = (OSThread*) &__osThreadTail.next;
mq->fullqueue = (OSThread*) &__osThreadTail.next;
mq->validCount = 0;
mq->first = 0;
mq->msgCount = msgCount;
mq->msg = msg;
}