View topic - InterruptUnmask() dumping core with SIGSEGV

InterruptUnmask() dumping core with SIGSEGV

General Help about QNX

InterruptUnmask() dumping core with SIGSEGV

Postby pramod_rao » Tue Oct 13, 2009 8:43 pm

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(;;) {

<< >>
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.

Regards
Pramod
pramod_rao
New Member
 
Posts: 1
Joined: Tue Oct 13, 2009 8:19 pm

RE: InterruptUnmask() dumping core with SIGSEGV

Postby mario » Wed Oct 14, 2009 3:15 am

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.
mario
QNX Master
 
Posts: 4132
Joined: Sun Sep 01, 2002 1:04 am


Return to Help

Who is online

Users browsing this forum: No registered users and 1 guest