c++ - 如何解决这个 Unresolved 断点警告?

标签 c++ c arrays string qnx

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;
}

我在另一个 .c 程序中获取 StartInterruptTime,并在上述程序中使用该时间戳来计算两者之间的差异(即 InterruptLatency)。我在调试程序时收到以下警告,并且 EndInterruptTime 将为零,但启动中断具有 double 值。

WARNING : Multiple markers at this line
    - Unresolved breakpoint

有人可以帮我吗?

最佳答案

好的。如果 InterruptLatency 类型不是 int64_t,请使用此 printf("Inerrupt Latency is %lu",InterruptLatency);

事实上,在 pintf("Inerrupt Latency is %Type_of_InterruptLatency",InterruptLatency); 中使用正确的 InterruptLatency 类型;

关于c++ - 如何解决这个 Unresolved 断点警告?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23547538/

相关文章:

c++ - C++ 中的内存模型 : sequential consistency and atomicity

c++ - Eclipse Oxygen C++ Hello World 跨 GCC 错误

c++ - 理解 operator() 重载

c - C中数组的指针

c - 在 C 中填充动态结构数组

arrays - 检查元素是否存在于 Bash 数组中

c++ - 在 C++ 可变参数模板中传递可变参数

经典堆栈溢出?

c - 如何在 OpenMP 中 fork 大量线程?

C GPIO 十六进制编号