[Previous] [Contents] [Next]

InterruptDisable()

Disable hardware interrupts

Synopsis:

#include <sys/neutrino.h>

void InterruptDisable( void );

Library:

libc

Description:

The InterruptDisable() kernel call disables all hardware interrupts. It may be called from a thread or from an interrupt handler. Before calling this function the thread must request IO privity by calling:

ThreadCtl( _NTO_TCTL_IO, 0 );

If the thread doesn't do this, it might SIGSEGV when InterruptUnlock() is called.

Interrupts should be reenabled by calling InterruptEnable().


Caution: Since this function disables all hardware interrupts, care should be taken 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()/InterruptUnlock() functions perform the intended function on SMP hardware, and allow your interrupt thread to run on any processor in the system.

Classification:

QNX 6

Safety:
Cancellation point No
Interrupt handler Yes
Signal handler Yes
Thread Yes

See also:

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


[Previous] [Contents] [Next]