Hello,
I have read all post and manuals about TimerTimeout in this forum and QNX site, but I can’t understand where is my problem.
There is my code:
[code] int errvalue;
uint64_t timeout = 10000000000;
TimerTimeout( CLOCK_REALTIME,_NTO_TIMEOUT_INTR ,&event, &timeout, NULL );
status=InterruptWait (0, NULL);
if (status < 0 ){ // error
errvalue = errno;
switch(errvalue){
case(EINTR): puts("The call was interrupted by a signal. ");
break;
case(ENOTSUP):puts("The reserved arguments aren't NULL. ");
break;
case(ETIMEDOUT):puts("TIMEOUT !!!. A kernel timeout unblocked the call. ");
break;
}
}
else{// normal interrupt
puts("Interrupt !!!");
}
[/code]
I am waiting for interrupt for 10s and after that I should get TIMEOUT status from InterruptWait but all the time I get normal interrupt status. It looks like normal interrupt, I can’t determinate what unblocked InterruptWait. All the time it looks like interrupt. Please check my code and tell me maybe my code is missing something.
After every 10s or when I fire interrupt, I get:
“Interrupt !!!”
but if there was no interrupt I should get:
"TIMEOUT !!!. A kernel timeout unblocked the call. "
Any comments are welcome.
Thanks!