InterruptDisable()

Отключить аппаратные прерывания

Прототип:

#include <sys/neutrino.h>
void InterruptDisable( void );

Библиотека:

libc

Описание:

The InterruptDisable() function disables all hardware interrupts. You can call it 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 );


Note: Any kernel call results in the re-enabling of interrupts, and many library routines are built on kernel calls. Masked interrupts are not affected.

If the thread doesn't do this, it might SIGSEGV when it calls InterruptDisable().

Reenable the interrupts by calling InterruptEnable().


Caution: Since this function disables all hardware interrupts, take care to reenable them as quickly as possible. Failure to do so may result in increased interrupt latency and nonrealtime performance.

Use InterruptDisable() instead of an inline cli to ensure hardware portability with non-x86 CPUs.


Note: Use InterruptLock() and InterruptUnlock() instead of InterruptDisable() and InterruptEnable(). The InterruptLock() and InterruptUnlock() functions perform the intended function on SMP hardware, and allow your interrupt thread to run on any processor in the system.

Классификация:

ЗОСРВ «Нейтрино»

Точка остановки потока
Нет
Обработчик прерываний
Да
Обработчик сигналов
Да
В потоке
Да

Тематические ссылки:

InterruptEnable(), InterruptLock(), InterruptMask(), InterruptUnlock(), InterruptUnmask(), ThreadCtl()




Предыдущий раздел: Описание API системной библиотеки