Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/i/interruptwait.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/i/interruptwait.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/i/interruptwait.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/i/interruptwait.html on line 8
Wait for a hardware interrupt
#include <sys/neutrino.h>
int InterruptWait( int flags,
const uint64_t * timeout );
int InterruptWait_r( int flags,
const uint64_t * timeout );
- flags
- This should currently be 0.
- timeout
- This should currently be NULL.
This may change in future versions.
libc
Use the -l c option to
qcc
to link against this library.
This library is usually included automatically.
These kernel calls wait for a hardware interrupt.
The calling thread should have attached a handler to the interrupt, by
calling
InterruptAttach()
or
InterruptAttachEvent().
The call to InterruptWait() or InterruptWait_r()
blocks waiting for an interrupt handler to return an event with
notification type SIGEV_INTR
(i.e. a hardware interrupt).
The InterruptWait() and InterruptWait_r()
functions are identical except in the way they indicate errors.
See the Returns section for details.
If the notification event occurs before InterruptWait() is called,
a pending flag is set.
When InterruptWait() is called, the flag is checked; if set,
it's cleared and the call immediately returns with success.
On a multicore system, a thread that calls InterruptWait()
runs on any CPU, limited only by the scheduler and the runmask.
- STATE_INTR
- The thread is waiting for an interrupt handler to return a SIGEV_INTR event.
The only difference between these functions is the way they indicate errors:
- InterruptWait()
- If an error occurs, -1 is returned and
errno is set. Any other value returned
indicates success.
- InterruptWait_r()
- EOK is returned on success. This function does NOT set errno.
If an error occurs, any value in the Errors section may be returned.
- EINTR
- The call was interrupted by a signal.
- ENOTSUP
- The reserved arguments aren't NULL.
- ETIMEDOUT
- A kernel timeout unblocked the call. See TimerTimeout().
QNX Neutrino
Safety: | |
Cancellation point |
Yes |
Interrupt handler |
No |
Signal handler |
Yes |
Thread |
Yes |
InterruptAttach(),
InterruptAttachEvent(),
TimerTimeout()
Writing an Interrupt Handler
chapter of the Neutrino Programmer's Guide
Interrupts
chapter of Getting Started with QNX Neutrino
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/i/interruptwait.html on line 210
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/i/interruptwait.html on line 210