Get information about blocked processes
#include <sys/dcmd_chr.h> #define DCMD_CHR_WAITINFO __DIOTF(_DCMD_CHR, 11, struct _ttywaitinfo)
Argument | Value |
---|---|
filedes | A file descriptor that you obtained by opening the device. |
dcmd | DCMD_CHR_WAITINFO |
dev_data_ptr | A pointer to a struct _ttywaitinfo |
n_bytes | sizeof(struct _ttywaitinfo) (see below) |
dev_info_ptr | NULL |
This command gets information about blocked processes. The client passes in the queue to query and the number of blocked processes that it can handle seeing.
The associated data types are:
typedef enum _tty_queue { TTY_NULL_Q, TTY_DEVCTL_Q, TTY_DRAIN_Q, TTY_WRITE_Q, TTY_READ_Q, TTY_OPEN_Q /* By definition we won't see see anything here, since we have to open the device to query it */ } _ttyqueue; struct _pidtid { pid_t pid; int tid; int offset; int nbytes; }; struct _ttywaitinfo { _ttyqueue queue; unsigned int num; struct _pidtid blocked[0]; };
A _ttywaitinfo structure, with:
A _ttywaitinfo structure, with the blocked array filled in, and num set to the number of entries that were filled in.
The devctl() function can return the following, in addition to the error codes listed in its entry in the C Library Reference:
devctl() in the QNX Neutrino C Library Reference