Skip to content

Instantly share code, notes, and snippets.

@aerodame
Last active August 29, 2015 14:20
Show Gist options
  • Save aerodame/84c7a89b70b9245ef0b3 to your computer and use it in GitHub Desktop.
Save aerodame/84c7a89b70b9245ef0b3 to your computer and use it in GitHub Desktop.
Disk IO Sync Snippet
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