mirror of
https://github.com/HarbourMasters/Starship.git
synced 2025-01-23 21:45:00 +03:00
Match osCreateMesgQueue
This commit is contained in:
parent
650dc4778a
commit
52a8a12bea
1
Makefile
1
Makefile
@ -273,6 +273,7 @@ build/src/libultra/libc/xlitob.o: OPTFLAGS := -O2 -g0
|
||||
build/src/libultra/libc/ll.o: OPTFLAGS := -O1 -g0
|
||||
build/src/libultra/libc/ll.o: MIPS_VERSION := -mips3 -32
|
||||
|
||||
build/src/libultra/os/createmesgqueue.o: OPTFLAGS := -O1 -g0
|
||||
build/src/libultra/os/getactivequeue.o: OPTFLAGS := -O1 -g0
|
||||
build/src/libultra/os/stopthread.o: OPTFLAGS := -O1 -g0
|
||||
|
||||
|
@ -1,3 +1,18 @@
|
||||
#include "common.h"
|
||||
#include "PR/os_internal.h"
|
||||
#include "PR/ultraerror.h"
|
||||
#include "osint.h"
|
||||
|
||||
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/os/createmesgqueue/osCreateMesgQueue.s")
|
||||
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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user