kernel/trap.c
void
trapinithart(void)
{
  w_stvec((uint64)kernelvec);
  w_sstatus(r_sstatus() | SSTATUS_SIE);
  // enable supervisor-mode timer interrupts.
  w_sie(r_sie() | SIE_SEIE | SIE_SSIE | SIE_STIE);
  set_next_timeout();
  #ifdef DEBUG
  printf("trapinithart\n");
  #endif
}
// set up to take exceptions and traps while in the kernel.
set up to take exceptions and traps while in the kernel.
set up to take exceptions and traps while in the kernel .
void
trapinithart(void)
{
  w_stvec((uint64)kernelvec);
  w_sstatus(r_sstatus() | SSTATUS_SIE);
  w_sie(r_sie() | SIE_SEIE | SIE_SSIE | SIE_STIE);
  set_next_timeout();
  #ifdef DEBUG
  printf("trapinithart\n");
  #endif
}
void trapinithart ( void ) { w_stvec ( ( uint64 ) kernelvec ) ; w_sstatus ( r_sstatus ( ) | SSTATUS_SIE ) ; w_sie ( r_sie ( ) | SIE_SEIE | SIE_SSIE | SIE_STIE ) ; set_next_timeout ( ) ; #ifdef DEBUG printf ( " \n " ) ; #endif }
set up to take exceptions and traps while in the kernel.
set up to take exceptions and traps while in the kernel .
// enable supervisor-mode timer interrupts.