![]() |
![]() |
![]() |
Enable a hardware interrupt
#include <sys/neutrino.h> int InterruptUnmask( int intr, int id );
libc
The InterruptUnmask() kernel call enables the hardware interrupt specified by intr for the interrupt handler specified by intr for the handler specified by id (which is the ID returned by InterruptAttach() or InterruptAttachEvent()) when the mask count reaches zero. It may be called from a thread or from an interrupt handler. Before calling this function the thread must request I/O privity by calling:
ThreadCtl( _NTO_TCTL_IO, 0 );
If the thread doesn't do this, it might SIGSEGV when InterruptUnlock() is called.
Calls to InterruptMask() are nested; the interrupt won't be unmasked until InterruptUnmask() has been called once for every call to InterruptMask().
![]() |
The id can be -1 if you don't want the kernel to track
interrupt masks and unmasks for each handler.
The id is ignored unless you use the _NTO_INTR_FLAGS_TRK_MSK flag in the InterruptAttach() call. |
The current mask count; or -1 if an error occurs (errno is set).
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | Yes |
Signal handler | Yes |
Thread | Yes |
InterruptAttach(), InterruptDisable(), InterruptEnable(), InterruptLock(), InterruptMask(), InterruptUnlock() ThreadCtl()
![]() |
![]() |
![]() |