mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-21 14:53:30 -04:00
a6e76c0841
* 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
37 lines
965 B
C++
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);
|
|
}
|