Get the current status of the current thread in the process associated with the file descriptor.
#include <sys/procfs.h> #define DCMD_PROC_STATUS __DIOF(_DCMD_PROC, __PROC_SUBCMD_PROCFS + 7, procfs_status)
The arguments to devctl() are:
| Argument | Value |
|---|---|
| filedes | A file descriptor for the process. |
| dcmd | DCMD_PROC_STATUS |
| dev_data_ptr | A pointer to a procfs_status structure |
| n_bytes | sizeof(procfs_status) |
| dev_info_ptr | NULL |
The argument is a pointer to a procfs_status structure (see debug_thread_t in <sys/debug.h>) that's filled in with the required information on return. For example:
procfs_status my_status;
devctl( fd, DCMD_PROC_STATUS, &my_status, sizeof(my_status),
NULL);
For more information about the contents of this structure, see "Thread information," earlier in this chapter.