qnx_hint_query

query an interrupt handler

Synopsis:

#include <sys/irqinfo.h>
int qnx_hint_query( pid_t proc_pid,
                    int iid,
                    struct _irqinfo *bufptr );

Description:

The qnx_hint_query() function returns a structure of information on an interrupt handler associated with iid on the node identified by proc_pid. If proc_pid is zero, the current node is used. To query another node, proc_pid should be passed as a virtual circuit to the process manager on that node. For example,

/* Attach a vc to the process manager on node 4 */
proc_pid = qnx_vc_attach( 4, PROC_PID, 0, 0 );

The iid is a small positive integer. If you ask for information on an ID that isn't in use, information is returned on the next monotonically greater ID. This automatic search for the next existing ID provides a convenient method of obtaining information on all handlers.

Returns:

The qnx_hint_query() function returns an interrupt id on success. If no interrupt handler with an ID greater than or equal to iid exists then a (-1) is returned, and errno is set.

Errors:

EINVAL
There is no handler with an interrupt ID that is greater than or equal to iid.

See also:

errno, qnx_hint_attach(), qnx_hint_detach(), qnx_vc_attach()

Examples:

#include <stdio.h>
#include <sys/irqinfo.h>
#include <errno.h>

void main()
  {
    int id;
    struct _irqinfo buf;

    printf( "List of interrupt handler on this node:\n" );
    for( id = 0;
       ( id = qnx_hint_query( 0, id, &buf ) ) != -1;
       ++id )
      printf( "Pid %d Irq %d\n", buf.pid, buf.intnum );
  }

Classification:

QNX

Systems:

QNX