Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/procdesc.h
| Show First 20 Lines • Show All 58 Lines • ▼ Show 20 Lines | |||||
| struct procdesc { | struct procdesc { | ||||
| /* | /* | ||||
| * Basic process descriptor state: the process, a cache of its pid to | * Basic process descriptor state: the process, a cache of its pid to | ||||
| * satisfy queries after the process exits, and process descriptor | * satisfy queries after the process exits, and process descriptor | ||||
| * refcount. | * refcount. | ||||
| */ | */ | ||||
| struct proc *pd_proc; /* (t) Process. */ | struct proc *pd_proc; /* (t) Process. */ | ||||
| pid_t pd_pid; /* (c) Cached pid. */ | pid_t pd_pid; /* (c) Cached pid. */ | ||||
| pid_t pd_last_child; /* (p) Pid of the last child. */ | |||||
| u_int pd_refcount; /* (r) Reference count. */ | u_int pd_refcount; /* (r) Reference count. */ | ||||
| u_int pd_fpcount; /* (p|t) files referencing me */ | u_int pd_fpcount; /* (p|t) files referencing me */ | ||||
| /* | /* | ||||
| * In-flight data and notification of events. | * In-flight data and notification of events. | ||||
| */ | */ | ||||
| int pd_flags; /* (p) PD_ flags. */ | int pd_flags; /* (p) PD_ flags. */ | ||||
| u_short pd_xstat; /* (p) Exit status. */ | u_short pd_xstat; /* (p) Exit status. */ | ||||
| Show All 22 Lines | #define F_PD_NOKILL 0x00000001 /* Opened with PD_DAEMON. Don't send | ||||
| SIGKILL when file closes. */ | SIGKILL when file closes. */ | ||||
| #define F_PD_NOFINSTALL 0x00000002 /* Procdesc file is closing because | #define F_PD_NOFINSTALL 0x00000002 /* Procdesc file is closing because | ||||
| finstall() failed */ | finstall() failed */ | ||||
| /* | /* | ||||
| * In-kernel interfaces to process descriptors. | * In-kernel interfaces to process descriptors. | ||||
| */ | */ | ||||
| bool procdesc_exit(struct proc *); | bool procdesc_exit(struct proc *); | ||||
| void procdesc_fork(struct proc *p, pid_t child_pid); | |||||
| void procdesc_jobstate(struct proc *p); | void procdesc_jobstate(struct proc *p); | ||||
| int kern_pdgetpid(struct thread *, int fd, const cap_rights_t *, | int kern_pdgetpid(struct thread *, int fd, const cap_rights_t *, | ||||
| pid_t *pidp); | pid_t *pidp); | ||||
| void procdesc_new(struct proc *, int); | void procdesc_new(struct proc *, int); | ||||
| void procdesc_finit(struct procdesc *, struct file *); | void procdesc_finit(struct procdesc *, struct file *); | ||||
| pid_t procdesc_pid(struct file *); | pid_t procdesc_pid(struct file *); | ||||
| void procdesc_reap(struct proc *); | void procdesc_reap(struct proc *); | ||||
| ▲ Show 20 Lines • Show All 45 Lines • Show Last 20 Lines | |||||