| 65 | // } |
| 66 | |
| 67 | DVDCommandBlock* __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 | |
| 104 | BOOL __DVDCheckWaitingQueue(void) |
| 105 | { |
no test coverage detected