MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / __DVDPopWaitingQueue

Function __DVDPopWaitingQueue

src/dolphin/src/dvd/dvdqueue.c:67–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65// }
66
67DVDCommandBlock* __DVDPopWaitingQueue(void)
68{
69 u32 i;
70 BOOL enabled;
71 DVDCommandBlock* q;
72 DVDCommandBlock* tmp;
73
74 enabled = OSDisableInterrupts();
75
76 for (i = 0; i < MAX_QUEUES; i++)
77 {
78 q = (DVDCommandBlock*)&(WaitingQueue[i]);
79 if (q->next != q)
80 {
81 OSRestoreInterrupts(enabled);
82 enabled = OSDisableInterrupts();
83
84 q = (DVDCommandBlock*)&(WaitingQueue[i]);
85
86 tmp = q->next;
87 q->next = tmp->next;
88 tmp->next->prev = q;
89
90 OSRestoreInterrupts(enabled);
91
92 tmp->next = (DVDCommandBlock*)NULL;
93 tmp->prev = (DVDCommandBlock*)NULL;
94
95 return tmp;
96 }
97 }
98
99 OSRestoreInterrupts(enabled);
100
101 return (DVDCommandBlock*)NULL;
102}
103
104BOOL __DVDCheckWaitingQueue(void)
105{

Callers 2

stateReadyFunction · 0.85
DVDCancelAllAsyncFunction · 0.85

Calls 1

OSDisableInterruptsFunction · 0.85

Tested by

no test coverage detected