mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-28 09:51:28 +00:00
Format all src C files
This commit is contained in:
parent
251aea64ab
commit
8cfe7cce9f
652 changed files with 12488 additions and 19093 deletions
|
@ -1,13 +1,10 @@
|
|||
#include <global.h>
|
||||
|
||||
s32 osRecvMesg(OSMesgQueue* mq, OSMesg* msg, s32 flag)
|
||||
{
|
||||
s32 osRecvMesg(OSMesgQueue* mq, OSMesg* msg, s32 flag) {
|
||||
register s32 s0 = __osDisableInt();
|
||||
|
||||
while (mq->validCount == 0)
|
||||
{
|
||||
if (flag == OS_MESG_NOBLOCK)
|
||||
{
|
||||
while (mq->validCount == 0) {
|
||||
if (flag == OS_MESG_NOBLOCK) {
|
||||
__osRestoreInt(s0);
|
||||
return -1;
|
||||
}
|
||||
|
@ -15,14 +12,16 @@ s32 osRecvMesg(OSMesgQueue* mq, OSMesg* msg, s32 flag)
|
|||
__osEnqueueAndYield(mq);
|
||||
}
|
||||
|
||||
if (msg != NULL)
|
||||
if (msg != NULL) {
|
||||
*msg = mq->msg[mq->first];
|
||||
}
|
||||
|
||||
mq->first = (mq->first + 1) % mq->msgCount;
|
||||
mq->validCount--;
|
||||
|
||||
if (mq->fullqueue->next != NULL)
|
||||
if (mq->fullqueue->next != NULL) {
|
||||
osStartThread(__osPopThread(&mq->fullqueue));
|
||||
}
|
||||
|
||||
__osRestoreInt(s0);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue