Files
dusklight/src/JSystem/JAudio2/JASCmdStack.cpp
T
TakaRikka a6e76c0841 project cleanup (#2895)
* some wii OS fixes

* remove old dol2asm comments

* remove dol2asm.h

* remove function address comments

* normalize ATTRIBUTE_ALIGN usage

* DECL_WEAK macro

* fix gcc attribute weak macro

* wrap more mwcc specific things in ifdefs

* fixes

* fix revo sdk version flags

* fixes
2025-11-30 15:23:42 -07:00

37 lines
965 B
C++

//
// JASCmdStack
//
#include "JSystem/JSystem.h" // IWYU pragma: keep
#include "JSystem/JAudio2/JASCmdStack.h"
#include "dolphin/os.h"
JASPortCmd::TPortHead JASPortCmd::sCommandListOnce;
JASPortCmd::TPortHead JASPortCmd::sCommandListStay;
void JASPortCmd::execAllCommand() {
sCommandListOnce.execCommandOnce();
sCommandListStay.execCommandStay();
}
void JASPortCmd::TPortHead::execCommandOnce() {
volatile BOOL interrupts = OSDisableInterrupts();
JSULink<JASPortCmd>* next;
for (JSULink<JASPortCmd>* link = getFirst(); link != NULL; link = next) {
next = link->getNext();
link->getObject()->_10(link->getObject()->_14);
remove(link);
}
OSRestoreInterrupts(interrupts);
}
void JASPortCmd::TPortHead::execCommandStay() {
volatile int interrupts = OSDisableInterrupts();
for (JSULink<JASPortCmd>* link = getFirst(); link != NULL; link = link->getNext()) {
link->getObject()->_10(link->getObject()->_14);
}
OSRestoreInterrupts(interrupts);
}