#include <sys/proc.h>
sys/proc.h
structextern_proc
Exported fields for kern sysctls
| unnamed union at sys/proc.h:92:2 | p_un | ||||||||||||||||
| |||||||||||||||||
| struct vmspace * | p_vmspace | Address space. | |||||||||||||||
| struct sigacts * | p_sigacts | Signal actions, state (PROC ONLY). | |||||||||||||||
| int | p_flag | P_* flags. | |||||||||||||||
| char | p_stat | S* process status. | |||||||||||||||
| pid_t | p_pid | Process identifier. | |||||||||||||||
| pid_t | p_oppid | Save parent pid during ptrace. XXX | |||||||||||||||
| int | p_dupfd | Sideways return value from fdopen. XXX | |||||||||||||||
| caddr_t | user_stack | Mach related where user stack was allocated | |||||||||||||||
| void * | exit_thread | XXX Which thread is exiting? | |||||||||||||||
| int | p_debugger | allow to debug | |||||||||||||||
| boolean_t | sigwait | indication to suspend | |||||||||||||||
| u_int | p_estcpu | scheduling Time averaged value of p_cpticks. | |||||||||||||||
| int | p_cpticks | Ticks of cpu time. | |||||||||||||||
| fixpt_t | p_pctcpu | %cpu for this process during p_swtime | |||||||||||||||
| void * | p_wchan | Sleep address. | |||||||||||||||
| char * | p_wmesg | Reason for sleep. | |||||||||||||||
| u_int | p_swtime | Time swapped in or out. | |||||||||||||||
| u_int | p_slptime | Time since last blocked. | |||||||||||||||
| struct itimerval | p_realtimer | Alarm timer. | |||||||||||||||
| struct timeval | p_rtime | Real time. | |||||||||||||||
| u_quad_t | p_uticks | Statclock hits in user mode. | |||||||||||||||
| u_quad_t | p_sticks | Statclock hits in system mode. | |||||||||||||||
| u_quad_t | p_iticks | Statclock hits processing intr. | |||||||||||||||
| int | p_traceflag | Kernel trace points. | |||||||||||||||
| struct vnode * | p_tracep | Trace to vnode. | |||||||||||||||
| int | p_siglist | DEPRECATED. | |||||||||||||||
| struct vnode * | p_textvp | Vnode of executable. | |||||||||||||||
| int | p_holdcnt | If non-zero, don't swap. | |||||||||||||||
| sigset_t | p_sigmask | DEPRECATED. | |||||||||||||||
| sigset_t | p_sigignore | Signals being ignored. | |||||||||||||||
| sigset_t | p_sigcatch | Signals being caught by user. | |||||||||||||||
| u_char | p_priority | Process priority. | |||||||||||||||
| u_char | p_usrpri | User-priority based on p_cpu and p_nice. | |||||||||||||||
| char | p_nice | Process "nice" value. | |||||||||||||||
| char[17] | p_comm | ||||||||||||||||
| struct pgrp * | p_pgrp | Pointer to process group. | |||||||||||||||
| struct user * | p_addr | Kernel virtual addr of u-area (PROC ONLY). | |||||||||||||||
| u_short | p_xstat | Exit status for wait; also stop signal. | |||||||||||||||
| u_short | p_acflag | Accounting flags. | |||||||||||||||
| struct rusage * | p_ru | Exit information. XXX | |||||||||||||||
macrop_forw
#define p_forw p_un.p_st1.__p_forw
macrop_back
#define p_back p_un.p_st1.__p_back
macrop_starttime
#define p_starttime p_un.__p_starttime
macroP_ADVLOCK
These flags are kept in extern_proc.p_flag.
#define P_ADVLOCK 0x00000001
Process may hold POSIX adv. lock
macroP_OWEUPC
Should be moved to machine-dependent areas.
#define P_OWEUPC 0x00008000
Owe process an addupc() call at next ast.
macroP_DELAYIDLESLEEP
#define P_DELAYIDLESLEEP 0x00040000
Process is marked to delay idle sleep on disk IO
macroP_CHECKOPENEVT
#define P_CHECKOPENEVT 0x00080000
check if a vnode has the OPENEVT flag set on open
macroP_DEPENDENCY_CAPABLE
#define P_DEPENDENCY_CAPABLE 0x00100000
process is ok to call vfs_markdependency()
macroP_ADOPTPERSONA
#define P_ADOPTPERSONA 0x04000000
process adopted a persona (used to be P_NOATTACH)
macroP_DIRTY_ALLOW_IDLE_EXIT
#define P_DIRTY_ALLOW_IDLE_EXIT 0x00000002
process can be idle-exited when clean
macroP_DIRTY_AGING_IN_PROGRESS
#define P_DIRTY_AGING_IN_PROGRESS 0x00000100
aging in one of the 'aging bands'
macroP_DIRTY_DEFER_ALWAYS
#define P_DIRTY_DEFER_ALWAYS 0x00000400
defer going to idle-exit after every dirty->clean transition.
For legacy jetsam policy only. This is the default with the other policies.
macroP_DIRTY_SHUTDOWN_ON_CLEAN
#define P_DIRTY_SHUTDOWN_ON_CLEAN 0x00000800
process should shutdown on going clean
macroP_DIRTY_IM_NEW_HERE
#define P_DIRTY_IM_NEW_HERE 0x00001000
process just enrolled in dirty tracking and has not yet marked itself dirty for the first time
macroP_DIRTY_IS_DIRTY
#define P_DIRTY_IS_DIRTY (P_DIRTY | P_DIRTY_SHUTDOWN)
macroP_DIRTY_IDLE_EXIT_ENABLED
#define P_DIRTY_IDLE_EXIT_ENABLED (P_DIRTY_TRACK|P_DIRTY_ALLOW_IDLE_EXIT)