![]() |
![]() |
![]() |
Detach an interrupt handler by ID
#include <sys/neutrino.h> int InterruptDetach( int id ); int InterruptDetach_r( int id );
libc
The InterruptDetach() and InterruptDetach_r() functions are identical except in the way they indicate errors. See the Returns section for details.
These kernel calls detach the interrupt handler specified by the id argument. The id variable is the value returned by an InterruptAttach() or InterruptAttachEvent() call. If, after detaching, no thread is attached to the interrupt then the interrupt is masked off.
Before calling either of these functions, 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.
These calls don't block.
The only difference between these functions is the way they indicate errors:
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |
InterruptAttach(), InterruptAttachEvent()
![]() |
![]() |
![]() |