![]() |
![]() |
![]() |
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 );
libc
The InterruptWait() and InterruptWait_r() functions are identical except in the way they indicate errors. See the Returns section for details.
These kernel calls wait for a hardware interrupt. The calling thread should have attached a handler to the interrupt using the InterruptAttach() or InterruptAttachEvent() kernel calls. The call blocks waiting for an interrupt handler to return an event with notification type SIGEV_INTR (i.e. a hardware interrupt).
If the notification event occurs before InterruptWait() is called, a pending flag is set. When InterruptWait() is called, the flag is checked and if set, it's cleared and the call immediately returns with success.
The flags variable should be 0, and timeout should be passed as NULL. This may change in future versions.
![]() |
Use TimerTimeout() to achieve a timeout. |
The only difference between these functions is the way they indicate errors:
Safety: | |
---|---|
Cancellation point | Yes |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |
InterruptAttach(), InterruptAttachEvent(), TimerTimeout()
![]() |
![]() |
![]() |