user/alarmtest.c
void
test0()
{
  int i;
  printf("test0 start\n");
  count = 0;
  sigalarm(2, periodic);
  for(i = 0; i < 1000*500000; i++){
    if((i % 250000) == 0)
      write(2, ".", 1);
    if(count > 0)
      break;
  }
  sigalarm(0, 0);
  if(count > 0){
    printf("test0 passed\n");
  } else {
    printf("test0 failed\n");
  }
}
// tests whether the kernel calls
// the alarm handler even a single time.
tests whether the kernel calls
the alarm handler even a single time.
tests whether the kernel calls the alarm handler even a single time .
void
test0()
{
  int i;
  printf("test0 start\n");
  count = 0;
  sigalarm(2, periodic);
  for(i = 0; i < 1000*500000; i++){
    if((i % 250000) == 0)
      write(2, ".", 1);
    if(count > 0)
      break;
  }
  sigalarm(0, 0);
  if(count > 0){
    printf("test0 passed\n");
  } else {
    printf("test0 failed\n");
  }
}
void test0 ( ) { int i ; printf ( " \n " ) ; count = 0 ; sigalarm ( 2 , periodic ) ; for ( i = 0 ; i < 1000 * 500000 ; i ++ ) { if ( ( i % 250000 ) == 0 ) write ( 2 , " " , 1 ) ; if ( count > 0 ) break ; } sigalarm ( 0 , 0 ) ; if ( count > 0 ) { printf ( " \n " ) ; } else { printf ( " \n " ) ; } }
tests whether the kernel calls
the alarm handler even a single time.
tests whether the kernel calls the alarm handler even a single time .