Found at 8001256C
Summary
A blocking drain for the CD command queue. It advances the CD state machine by calling cdlib_manager until the idle state is reached in a loop. VSync(2) is called after each advance as a throttle.
Behavior
If cdIoState is already idle on entry nothing needs be done and the function returns. Otherwise it calls cdlib_manager to advance the CD state machine followed by VSync(2) in a loop. The VSync(2) is used to pace the loop. We keep advancing until we reach the idle state.
Notes
- I believe this was originally a simple while loop, it doesnt feel human written and a plain while does the same thing.