InterruptUnmask() dumping core with SIGSEGV

Hi Forum,

I have hit a case where InterruptUnmask() dumping core with SIGSEGV. Here is how the code looks.

<< … >>

ThreadCtl(_NTO_TCTL_IO, 0);

<< … >>

for(;:wink: {

<< >>
received PULSE
handle the interrupt
InterruptUnmask() //to re-enable the pulse
<< >>


InterruptUnmask() manpage says we need to call ThreadCtl() for I/O access by the thread before calling InterruptUnmask(). Here is my question. Do I need to call ThreadCtl() before calling InterruptUnmask() everytime or calling it once before for() loop as it is today is fine?

If calling it once before for() is enough what are the other reasons InterruptUnmask() can generate SIGSEGV.

Thanks in advacne for the help.


Once is enough, you must be root when running the program and post real code so people can look at it and possibly find the real bug.