Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/i/interruptdetach.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/i/interruptdetach.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/i/interruptdetach.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/i/interruptdetach.html on line 8

InterruptDetach(), InterruptDetach_r()

Detach an interrupt handler by ID

Synopsis:

#include <sys/neutrino.h>

int InterruptDetach( int id );

int InterruptDetach_r( int id );

Arguments:

id
The value returned by InterruptAttach() InterruptAttachEvent(), or InterruptHookIdle().

Library:

libc

Use the -l c option to qcc to link against this library. This library is usually included automatically.

Description:

These kernel calls detach the interrupt handler specified by the id argument. If, after detaching, no thread is attached to the interrupt then the interrupt is masked off.

The InterruptDetach() and InterruptDetach_r() functions are identical except in the way they indicate errors. See the Returns section for details.

Before calling either of these functions, 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 InterruptDetach() or InterruptDetach_r().

Blocking states

These calls don't block.

Returns:

The only difference between these functions is the way they indicate errors:

InterruptDetach()
If an error occurs, -1 is returned and errno is set. Any other value returned indicates success.
InterruptDetach_r()
EOK is returned on success. This function does NOT set errno. If an error occurs, any value in the Errors section may be returned.

Errors:

EINVAL
The value of id doesn't exist for this process.
EPERM
The process doesn't have superuser capabilities.

Classification:

QNX Neutrino

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

See also:

InterruptAttach(), InterruptAttachEvent(), InterruptHookIdle(), InterruptUnlock()

Writing an Interrupt Handler chapter of the Neutrino Programmer's Guide

Interrupts chapter of Getting Started with QNX Neutrino


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/i/interruptdetach.html on line 188

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/i/interruptdetach.html on line 188