0
int id1;   //variables used in the isr should be volatile
int chid;

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 = 11;   //0 :   A clock that runs at the resolution set by ClockPeriod()
    //  InterruptEnable();
    ThreadCtl (_NTO_TCTL_IO, NULL);  // enables the hardware interrupt
    // Initialize event structure
    //
    // Setup COID and event
    //
    /* Tell the kernel to attach an interrupt signal event to this thread */
    //        chid = ChannelCreate( 0 );
    SIGEV_INTR_INIT( &event);
    //id1 = InterruptAttach(0, ISR, NULL, 0, 0);    // ISR is the interrupt service routine
    id1 = InterruptAttach(_NTO_INTR_CLASS_SYNTHETIC, ISR, NULL, 0, 0);
    if (id1 == -1)
    {
        fprintf(stderr, "can't attach to IRQ\n");
        perror (NULL);
        exit (EXIT_FAILURE);
    }
    while(1)
    {
        InterruptWait(NULL, NULL);
    }
    EndInterruptTime =  GetTimeStamp();
    InterruptLatency = (EndInterruptTime - StartInterruptTime);
    printf("Inerrupt latency is %llu",InterruptLatency);   //I am getting warning
    measurements[17] = InterruptLatency;
}

I am getting the StartInterruptTime in another .c program and using that timestamp in the above program for calculating the difference between the two (i.e InterruptLatency). I am getting the below warning while debugging the program and also EndInterruptTime will be zero but start interrupt is having the double value.

WARNING : Multiple markers at this line
    - Unresolved breakpoint

could some one please help me in this ?

Mohit Jain
  • 30,259
  • 8
  • 73
  • 100

1 Answers1

0

Ok. If InterruptLatency type is not int64_t use this printf("Inerrupt latency is %lu",InterruptLatency);.

In fact use correct type of InterruptLatency into pintf("Inerrupt latency is %Type_of_InterruptLatency",InterruptLatency);

  • data type : uint64_t InterruptLatency; uint64_t measurements[32]; then shall i use as you said ?? – user3615655 May 12 '14 at 06:30
  • Do you test output `cout < –  May 12 '14 at 09:47
  • Replace `id1 = InterruptAttach(_NTO_INTR_CLASS_SYNTHETIC, ISR, NULL, 0, 0);` with `id1 = InterruptAttach(_NTO_INTR_CLASS_SYNTHETIC, &ISR, NULL, 0, 0);` And `InterruptLatency = (EndInterruptTime - StartInterruptTime)` with `InterruptLatency =(double)(EndInterruptTime - StartInterruptTime)`. –  May 12 '14 at 10:03