2

/*kernel calls attach the interrupt function handler to the hardware interrupt specified by intr(i.e irq) */ // InterruptAttach() : Attach an interrupt handler to an interrupt source // interrupt source is handler1 for this example

 void ConfigureISR(void)   //void *ISR (void *arg)
  {

/* the software must tell the OS that it wishes to associate the ISR with a particular source of //interrupts. On x86 platforms, there are generally 16 hardware Interrupt Request lines (IRQs) */

  StartInterruptTime = GetTimeStamp();   //startTime of the interrupt

  volatile int irq = 7;   //0 : A clock that runs at the resolution set by ClockPeriod()

  ThreadCtl (_NTO_TCTL_IO, NULL);  // enables the hardware interrupt
  id1 = InterruptAttach(irq, &ISR, NULL, 0, 0);    // ISR is the interrupt service routine

  //sleep(20);


  }
int main ()
{
ConfigureISR();
return 1;
}

I created a interrupt handler on the server side to handle the interrupt from the client side. but the above code is breaking at the interrupt attach function call. could someone tell me why is it breaking ?? Is it the right way to handle interrupts in user application.

0 Answers0