lapic.c
// Spin for a given number of microseconds.
// On real hardware would want to tune this dynamically.
Spin for a given number of microseconds.
On real hardware would want to tune this dynamically.
Spin for a given number of microseconds . On real hardware would want to tune this dynamically .
static void
microdelay(int us)
{
  volatile int j = 0;
  while(us-- > 0)
    for(j=0; j<10000; j++);
}
static void microdelay ( int us ) { volatile int j = 0 ; while ( us -- > 0 ) for ( j = 0 ; j < 10000 ; j ++ ) ; }
Spin for a given number of microseconds.
Spin for a given number of microseconds .