Включить аппаратное прерывание
#include <sys/neutrino.h>int InterruptUnmask( int intr,int id );
-1
if you don't want the kernel to track interrupt maskings and unmaskings for each handler.
![]() | The id is ignored unless you use the _NTO_INTR_FLAGS_TRK_MSK flag when you attach the handler. |
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 when the mask count reaches zero. You can call this function from a thread or from an interrupt handler. Before calling this function, the thread must request I/O privileges by calling:
ThreadCtl( _NTO_TCTL_IO, 0 );
If the thread doesn't do this, it might SIGSEGV
when it calls InterruptUnmask().
Calls to InterruptMask() are nested; the interrupt isn't unmasked until InterruptUnmask() has been called once for every call to InterruptMask().
The current mask count.
Если возникла ошибка функция возвращает -1
, код ошибки записывается в errno.
-1
. ЗОСРВ «Нейтрино»
InterruptAttach(), InterruptAttachEvent(), InterruptDisable(), InterruptEnable(), InterruptLock(), InterruptMask(), InterruptUnlock() ThreadCtl()
Предыдущий раздел: Описание API системной библиотеки