Last active
August 29, 2015 14:20
-
-
Save aerodame/84c7a89b70b9245ef0b3 to your computer and use it in GitHub Desktop.
Disk IO Sync Snippet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Disk disk = new Disk( 1000 ); | |
// a disk read operation: | |
while ( disk.read( blockId, buffer ) == false ) | |
; // busy wait | |
while ( disk.testAndResetReady( ) == false ) | |
; // another busy wait | |
// now you can access data in buffer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment