timer_timeout doesn't work ...

Hello,

I have tried to define a kernel timeout for the time beeing suspeneded
in an InterruptWait call … but the task remains suspended for ever.

Why does this happen ??

Here is the example code:

event.sigev_notify = SIGEV_INTR;
timeout.tv_sec = 10;
timeout.tv_nsec =0;
timer_timeout(CLOCK_REALTIME, _NTO_TIMEOUT_INTR, &event, timeout, NULL);

if(InterruptWait(NULL, NULL) == -1)
{
if(errno == ETIMEDOUT)
perror(“interrupt timeout!\n”);
else
perror(“unexpected error …\n”);

exit(-1);
}

Best Regards

Armin Steinhoff

Don’t you want…

event.sigev_notify = SIGEV_UNBLOCK;


chris



Armin Steinhoff <a-steinhoff@web_.de> wrote:

Hello,

I have tried to define a kernel timeout for the time beeing suspeneded
in an InterruptWait call … but the task remains suspended for ever.

Why does this happen ??

Here is the example code:

event.sigev_notify = SIGEV_INTR;
timeout.tv_sec = 10;
timeout.tv_nsec =0;
timer_timeout(CLOCK_REALTIME, _NTO_TIMEOUT_INTR, &event, timeout, NULL);

if(InterruptWait(NULL, NULL) == -1)
{
if(errno == ETIMEDOUT)
perror(“interrupt timeout!\n”);
else
perror(“unexpected error …\n”);

exit(-1);
}

Best Regards

Armin Steinhoff

cdm@qnx.com > “The faster I go, the behinder I get.”

Chris McKillop – Lewis Carroll –
Software Engineer, QSSL
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

Chris McKillop wrote:

Don’t you want…

event.sigev_notify = SIGEV_UNBLOCK;

Thanks :slight_smile:

Do you know what “Only SIGEV_UNBLOCK guarantees that the kernel call
unblocks”. The docs are a little bit fuzzy here …

Armin


chris



Armin Steinhoff <a-steinhoff@web_.de> wrote:


Hello,

I have tried to define a kernel timeout for the time beeing suspeneded
in an InterruptWait call … but the task remains suspended for ever.

Why does this happen ??

Here is the example code:

event.sigev_notify = SIGEV_INTR;
timeout.tv_sec = 10;
timeout.tv_nsec =0;
timer_timeout(CLOCK_REALTIME, _NTO_TIMEOUT_INTR, &event, timeout, NULL);

if(InterruptWait(NULL, NULL) == -1)
{
if(errno == ETIMEDOUT)
perror(“interrupt timeout!\n”);
else
perror(“unexpected error …\n”);

exit(-1);
}

Best Regards

Armin Steinhoff