1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-06-07 17:11:50 +00:00
oot/src/libultra/io/piacs.c
Tharo c028db03b4
Finish matching ique-cn (#2451)
* git subrepo clone git@github.com:Thar0/com-plugin.git tools/com-plugin

subrepo:
  subdir:   "tools/com-plugin"
  merged:   "e8543312d"
upstream:
  origin:   "git@github.com:Thar0/com-plugin.git"
  branch:   "main"
  commit:   "e8543312d"
git-subrepo:
  version:  "0.4.6"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "110b9eb"

* ique-cn OK

* Review suggestions

* Most suggestions

* git subrepo pull tools/com-plugin

subrepo:
  subdir:   "tools/com-plugin"
  merged:   "81595ed1c"
upstream:
  origin:   "git@github.com:Thar0/com-plugin.git"
  branch:   "main"
  commit:   "81595ed1c"
git-subrepo:
  version:  "0.4.6"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "110b9eb"

* Fix other versions
2025-02-04 06:55:04 -05:00

25 lines
614 B
C

#include "global.h"
u32 __osPiAccessQueueEnabled = false;
static OSMesg piAccessBuf[1];
OSMesgQueue __osPiAccessQueue;
void __osPiCreateAccessQueue(void) {
__osPiAccessQueueEnabled = true;
osCreateMesgQueue(&__osPiAccessQueue, piAccessBuf, ARRAY_COUNT(piAccessBuf));
osSendMesg(&__osPiAccessQueue, NULL, OS_MESG_NOBLOCK);
}
void __osPiGetAccess(void) {
OSMesg msg;
if (!__osPiAccessQueueEnabled) {
__osPiCreateAccessQueue();
}
osRecvMesg(&__osPiAccessQueue, &msg, OS_MESG_BLOCK);
}
void __osPiRelAccess(void) {
osSendMesg(&__osPiAccessQueue, NULL, OS_MESG_NOBLOCK);
}