Code: Select all
while (sdGetWouldBlock(&SD1))
sdGet(&SD1);
This caused a kernel panic with "SV#10", because sdGetWouldBlock() aliases to iqIsEmptyI(), an I-Class function. However, the documentation specifically lists it as a normal API function.
For the short term I'm just going to put the call in a lock zone, but it seems to me that either:
- The function should be renamed sdGetWouldBlockI() and the documentation appropriately updated
- The function should internally lock before calling the iq function
I also note that the function is listed as deprecated, so if possible I'd like to respect that. Is there another way to perform a buffer flush? Looking at the documentation, one doesn't immediately jump out at me.
Thanks in advance.