InterruptHookTrace()

Attach the pseudo interrupt handler that the instrumented module uses

Synopsis:

#include <sys/neutrino.h>

int InterruptHookTrace( 
   const struct sigevent * (* handler)(int),
   unsigned flags );

Arguments:

handler
A pointer to the handler function.
flags
There are currently no flags that apply; specify 0 for this argument.

Library:

libc

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

Description:

The InterruptHookTrace() kernel call attaches the pseudo interrupt handler handle that the instrumented module uses.

Note: This function requires the instrumented kernel. For more information, see the System Analysis Toolkit (SAT) User's Guide.

Before calling this function, the thread must:

The handler argument specifies the pseudo interrupt handler that receives trace events from the kernel. The integer that's passed to the handler is a combination of the buffer index and the sequence number; to extract each part, pass the integer to the _TRACE_GET_BUFFNUM() and _TRACE_GET_BUFFSEQ() macros defined in <sys/trace.h>.

Blocking states

This call doesn't block.

Returns:

An interrupt function ID, or -1 if an error occurs (errno is set).

Errors:

EAGAIN
All kernel interrupt entries are in use.
EFAULT
A fault occurred when the kernel tried to access the buffers provided.
EPERM
The process doesn't have I/O privileges, or it doesn't have the required permission; see procmgr_ability().
ENOTSUP
The kernel isn't instrumented.

Classification:

QNX Neutrino

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