DCMD_PROC_IRQS
QNX SDP8.0Programmer's GuideDeveloper
Get information about the interrupts that the process associated with the file descriptor has attached to.
#include <sys/procfs.h>
#define DCMD_PROC_IRQS (__DIOF(_DCMD_PROC, __PROC_SUBCMD_PROCFS + 24, procfs_irq))
The arguments to devctl() are:
Argument | Value |
---|---|
filedes | A file descriptor for the process. |
dcmd | DCMD_PROC_IRQS |
dev_data_ptr | NULL, or an array of procfs_irq structures |
n_bytes | 0, or the size of the array |
dev_info_ptr | A pointer to an integer where the number of interrupt attaches can be stored |
Call this the first time with an argument of NULL to get the number of interrupt attaches:
devctl( fd, DCMD_PROC_IRQS, NULL, 0, &n);
Next, allocate a buffer that's large enough to hold a procfs_irq structure (see debug_irq64_t in <sys/debug.h>) for each attach, and pass it to another devctl() call:
my_buffer = (procfs_irq *) malloc( sizeof(procfs_irq) * n );
if ( my_buffer == NULL ) {
/* Not enough memory. */
}
devctl( fd, DCMD_PROC_IRQS, my_buffer, sizeof(procfs_irq) * n,
&dummy);
Page updated: