src/timer.c
/************************************************************************/
/*									*/
/*			i n t _ i o _ i n i t				*/
/*									*/
/*	Set up handling for the SIGIO signals, in			*/
/*	support of keyboard event handling and ethernet incoming-	*/
/*	packet handling.						*/
/*									*/
/*									*/
/************************************************************************/


Set up handling for the SIGIO signals, in
support of keyboard event handling and ethernet incoming
packet handling.
Set up handling for the SIGIO signals in support of keyboard event handling and ethernet incoming packet handling .
static void int_io_init() {
#ifndef DOS
  struct sigaction io_action;
  io_action.sa_handler = int_io_service;
  sigemptyset(&io_action.sa_mask);
  io_action.sa_flags = 0;
  if (sigaction(SIGIO, &io_action, NULL) == -1) {
    perror("sigaction: SIGIO");
  } else {
    DBPRINT(("I/O interrupts enabled\n"));
  }
#if defined(USE_DLPI)
  DBPRINT(("INIT ETHER:  Doing I_SETSIG.\n"));
  if (ether_fd > 0)
    if (ioctl(ether_fd, I_SETSIG, S_INPUT) != 0) {
      perror("init_ether: I_SETSIG failed:\n");
      close(ether_fd);
      ether_fd = -1;
      return;
    }
#endif 
#endif 
}
static void int_io_init ( ) { #ifndef DOS struct sigaction io_action ; io_action . sa_handler = int_io_service ; sigemptyset ( & io_action . sa_mask ) ; io_action . sa_flags = 0 ; if ( sigaction ( SIGIO , & io_action , NULL ) == -1 ) { perror ( " " ) ; } else { DBPRINT ( ( " \n " ) ) ; } #if defined ( USE_DLPI ) DBPRINT ( ( " \n " ) ) ; if ( ether_fd > 0 ) if ( ioctl ( ether_fd , I_SETSIG , S_INPUT ) != 0 ) { perror ( " \n " ) ; close ( ether_fd ) ; ether_fd = -1 ; return ; } #endif #endif }
i n t _ i o _ i n i t
i n t _ i o _ i n i t
/* USE_DLPI */ /* DOS */