QNX 6.0: how to communicate between ISR handler and threads

I hooked an ISR handler to the main thead, then created another thread( a
normal thread) from the main thread which blocks itself till it receives
some kind of signal from the ISR. Now when an interrupt occurs the ISR
starts, but how can it send a signal to my blocked thread? The blocked
thread cannot use functions like
InterruptWait( ) , because its not the thread which hooked on the ISR
handler. I tried to achieve some method of communication by sending
ulses( pulses because Semaphores, mutex etc. are not at all supported from
an ISR handler!) from the ISR to awake the blocked thread. But it crashes
the system, perhaps because i cannot even send pulses from the ISR handler.
One way to achieve what i want is to first signal an event from the ISR to
the main thread(the one which hooked the ISR) and from there signal the
blocked thread. But i am interested in direct communication between the ISR
handler and the blocked thread. Especially so because i know that it was
possible to communicate directly, between ISR handler and the other threads,
in earlier versions of QNX using ‘proxies’, which are no longer supported by
QNX 6.0. And ‘proxies’, as the QNX migration library tells me, have been
replaced by ‘pulses’.

The ISR can return an event (sigevent). That event can be setup as a pulse
event,
intr event or signal event and a few other.

You cannot sent the event yourself from the ISR you can only return a
pointer
to the event. The kernel will take care of it.

Hope that helps.

  • Mario

“Mukul Dhankhar” <m.dhankhar@dedicated-systems.com> wrote in message
news:3b49d625$0$7114$4d4efb8e@news.be.uu.net

I hooked an ISR handler to the main thead, then created another thread( a
normal thread) from the main thread which blocks itself till it receives
some kind of signal from the ISR. Now when an interrupt occurs the ISR
starts, but how can it send a signal to my blocked thread? The blocked
thread cannot use functions like
InterruptWait( ) , because its not the thread which hooked on the ISR
handler. I tried to achieve some method of communication by sending
ulses( pulses because Semaphores, mutex etc. are not at all supported from
an ISR handler!) from the ISR to awake the blocked thread. But it crashes
the system, perhaps because i cannot even send pulses from the ISR
handler.
One way to achieve what i want is to first signal an event from the ISR
to
the main thread(the one which hooked the ISR) and from there signal the
blocked thread. But i am interested in direct communication between the
ISR
handler and the blocked thread. Especially so because i know that it was
possible to communicate directly, between ISR handler and the other
threads,
in earlier versions of QNX using ‘proxies’, which are no longer supported
by
QNX 6.0. And ‘proxies’, as the QNX migration library tells me, have been
replaced by ‘pulses’.