Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/proc.h
Show First 20 Lines • Show All 462 Lines • ▼ Show 20 Lines | ||||||||||
#define TDF_NEEDSUSPCHK 0x00008000 /* Thread may need to suspend. */ | #define TDF_NEEDSUSPCHK 0x00008000 /* Thread may need to suspend. */ | |||||||||
#define TDF_NEEDRESCHED 0x00010000 /* Thread needs to yield. */ | #define TDF_NEEDRESCHED 0x00010000 /* Thread needs to yield. */ | |||||||||
#define TDF_NEEDSIGCHK 0x00020000 /* Thread may need signal delivery. */ | #define TDF_NEEDSIGCHK 0x00020000 /* Thread may need signal delivery. */ | |||||||||
#define TDF_NOLOAD 0x00040000 /* Ignore during load avg calculations. */ | #define TDF_NOLOAD 0x00040000 /* Ignore during load avg calculations. */ | |||||||||
#define TDF_SERESTART 0x00080000 /* ERESTART on stop attempts. */ | #define TDF_SERESTART 0x00080000 /* ERESTART on stop attempts. */ | |||||||||
#define TDF_THRWAKEUP 0x00100000 /* Libthr thread must not suspend itself. */ | #define TDF_THRWAKEUP 0x00100000 /* Libthr thread must not suspend itself. */ | |||||||||
#define TDF_SEINTR 0x00200000 /* EINTR on stop attempts. */ | #define TDF_SEINTR 0x00200000 /* EINTR on stop attempts. */ | |||||||||
#define TDF_SWAPINREQ 0x00400000 /* Swapin request due to wakeup. */ | #define TDF_SWAPINREQ 0x00400000 /* Swapin request due to wakeup. */ | |||||||||
#define TDF_UNUSED23 0x00800000 /* --available-- */ | #define TDF_DOING_SA 0x00800000 /* Doing SINGLE_ALLPROC, do not unsuspend me */ | |||||||||
#define TDF_SCHED0 0x01000000 /* Reserved for scheduler private use */ | #define TDF_SCHED0 0x01000000 /* Reserved for scheduler private use */ | |||||||||
#define TDF_SCHED1 0x02000000 /* Reserved for scheduler private use */ | #define TDF_SCHED1 0x02000000 /* Reserved for scheduler private use */ | |||||||||
#define TDF_SCHED2 0x04000000 /* Reserved for scheduler private use */ | #define TDF_SCHED2 0x04000000 /* Reserved for scheduler private use */ | |||||||||
#define TDF_SCHED3 0x08000000 /* Reserved for scheduler private use */ | #define TDF_SCHED3 0x08000000 /* Reserved for scheduler private use */ | |||||||||
#define TDF_ALRMPEND 0x10000000 /* Pending SIGVTALRM needs to be posted. */ | #define TDF_ALRMPEND 0x10000000 /* Pending SIGVTALRM needs to be posted. */ | |||||||||
#define TDF_PROFPEND 0x20000000 /* Pending SIGPROF needs to be posted. */ | #define TDF_PROFPEND 0x20000000 /* Pending SIGPROF needs to be posted. */ | |||||||||
#define TDF_MACPEND 0x40000000 /* AST-based MAC event pending. */ | #define TDF_MACPEND 0x40000000 /* AST-based MAC event pending. */ | |||||||||
▲ Show 20 Lines • Show All 206 Lines • ▼ Show 20 Lines | #define p_startzero p_vmspace | |||||||||
int p_boundary_count;/* (j) Num threads at user boundary */ | int p_boundary_count;/* (j) Num threads at user boundary */ | |||||||||
int p_pendingcnt; /* how many signals are pending */ | int p_pendingcnt; /* how many signals are pending */ | |||||||||
struct itimers *p_itimers; /* (c) POSIX interval timers. */ | struct itimers *p_itimers; /* (c) POSIX interval timers. */ | |||||||||
struct procdesc *p_procdesc; /* (e) Process descriptor, if any. */ | struct procdesc *p_procdesc; /* (e) Process descriptor, if any. */ | |||||||||
u_int p_treeflag; /* (e) P_TREE flags */ | u_int p_treeflag; /* (e) P_TREE flags */ | |||||||||
int p_pendingexits; /* (c) Count of pending thread exits. */ | int p_pendingexits; /* (c) Count of pending thread exits. */ | |||||||||
struct filemon *p_filemon; /* (c) filemon-specific data. */ | struct filemon *p_filemon; /* (c) filemon-specific data. */ | |||||||||
int p_pdeathsig; /* (c) Signal from parent on exit. */ | int p_pdeathsig; /* (c) Signal from parent on exit. */ | |||||||||
int p_singlethr; /* (c) Count of threads doing | ||||||||||
markj: Looks like it should be `(c)`. | ||||||||||
external thread_single() */ | ||||||||||
/* End area that is zeroed on creation. */ | /* End area that is zeroed on creation. */ | |||||||||
#define p_endzero p_magic | #define p_endzero p_magic | |||||||||
/* The following fields are all copied upon creation in fork. */ | /* The following fields are all copied upon creation in fork. */ | |||||||||
#define p_startcopy p_endzero | #define p_startcopy p_endzero | |||||||||
u_int p_magic; /* (b) Magic number. */ | u_int p_magic; /* (b) Magic number. */ | |||||||||
int p_osrel; /* (x) osreldate for the | int p_osrel; /* (x) osreldate for the | |||||||||
binary (from ELF note, if any) */ | binary (from ELF note, if any) */ | |||||||||
▲ Show 20 Lines • Show All 140 Lines • ▼ Show 20 Lines | #define P2_STKGAP_DISABLE 0x00000800 /* Disable stack gap for | |||||||||
MAP_STACK */ | MAP_STACK */ | |||||||||
#define P2_STKGAP_DISABLE_EXEC 0x00001000 /* Stack gap disabled | #define P2_STKGAP_DISABLE_EXEC 0x00001000 /* Stack gap disabled | |||||||||
after exec */ | after exec */ | |||||||||
#define P2_ITSTOPPED 0x00002000 | #define P2_ITSTOPPED 0x00002000 | |||||||||
#define P2_PTRACEREQ 0x00004000 /* Active ptrace req */ | #define P2_PTRACEREQ 0x00004000 /* Active ptrace req */ | |||||||||
#define P2_NO_NEW_PRIVS 0x00008000 /* Ignore setuid */ | #define P2_NO_NEW_PRIVS 0x00008000 /* Ignore setuid */ | |||||||||
#define P2_WXORX_DISABLE 0x00010000 /* WX mappings enabled */ | #define P2_WXORX_DISABLE 0x00010000 /* WX mappings enabled */ | |||||||||
#define P2_WXORX_ENABLE_EXEC 0x00020000 /* WXORX enabled after exec */ | #define P2_WXORX_ENABLE_EXEC 0x00020000 /* WXORX enabled after exec */ | |||||||||
#define P2_WEXIT 0x00040000 /* exit just started, no | ||||||||||
external thread_single() is | ||||||||||
Done Inline Actions
? markj: ? | ||||||||||
permitted */ | ||||||||||
/* Flags protected by proctree_lock, kept in p_treeflags. */ | /* Flags protected by proctree_lock, kept in p_treeflags. */ | |||||||||
#define P_TREE_ORPHANED 0x00000001 /* Reparented, on orphan list */ | #define P_TREE_ORPHANED 0x00000001 /* Reparented, on orphan list */ | |||||||||
#define P_TREE_FIRST_ORPHAN 0x00000002 /* First element of orphan | #define P_TREE_FIRST_ORPHAN 0x00000002 /* First element of orphan | |||||||||
list */ | list */ | |||||||||
#define P_TREE_REAPER 0x00000004 /* Reaper of subtree */ | #define P_TREE_REAPER 0x00000004 /* Reaper of subtree */ | |||||||||
#define P_TREE_GRPEXITED 0x00000008 /* exit1() done with job ctl */ | #define P_TREE_GRPEXITED 0x00000008 /* exit1() done with job ctl */ | |||||||||
▲ Show 20 Lines • Show All 292 Lines • ▼ Show 20 Lines | ||||||||||
int proc_getenvv(struct thread *td, struct proc *p, struct sbuf *sb); | int proc_getenvv(struct thread *td, struct proc *p, struct sbuf *sb); | |||||||||
void procinit(void); | void procinit(void); | |||||||||
int proc_iterate(int (*cb)(struct proc *, void *), void *cbarg); | int proc_iterate(int (*cb)(struct proc *, void *), void *cbarg); | |||||||||
void proc_linkup0(struct proc *p, struct thread *td); | void proc_linkup0(struct proc *p, struct thread *td); | |||||||||
void proc_linkup(struct proc *p, struct thread *td); | void proc_linkup(struct proc *p, struct thread *td); | |||||||||
struct proc *proc_realparent(struct proc *child); | struct proc *proc_realparent(struct proc *child); | |||||||||
void proc_reap(struct thread *td, struct proc *p, int *status, int options); | void proc_reap(struct thread *td, struct proc *p, int *status, int options); | |||||||||
void proc_reparent(struct proc *child, struct proc *newparent, bool set_oppid); | void proc_reparent(struct proc *child, struct proc *newparent, bool set_oppid); | |||||||||
void proc_set_p2_wexit(struct proc *p); | ||||||||||
void proc_set_traced(struct proc *p, bool stop); | void proc_set_traced(struct proc *p, bool stop); | |||||||||
void proc_wkilled(struct proc *p); | void proc_wkilled(struct proc *p); | |||||||||
struct pstats *pstats_alloc(void); | struct pstats *pstats_alloc(void); | |||||||||
void pstats_fork(struct pstats *src, struct pstats *dst); | void pstats_fork(struct pstats *src, struct pstats *dst); | |||||||||
void pstats_free(struct pstats *ps); | void pstats_free(struct pstats *ps); | |||||||||
void proc_clear_orphan(struct proc *p); | void proc_clear_orphan(struct proc *p); | |||||||||
void reaper_abandon_children(struct proc *p, bool exiting); | void reaper_abandon_children(struct proc *p, bool exiting); | |||||||||
int securelevel_ge(struct ucred *cr, int level); | int securelevel_ge(struct ucred *cr, int level); | |||||||||
▲ Show 20 Lines • Show All 61 Lines • ▼ Show 20 Lines | ||||||||||
int thread_suspend_check(int how); | int thread_suspend_check(int how); | |||||||||
bool thread_suspend_check_needed(void); | bool thread_suspend_check_needed(void); | |||||||||
void thread_suspend_switch(struct thread *, struct proc *p); | void thread_suspend_switch(struct thread *, struct proc *p); | |||||||||
void thread_suspend_one(struct thread *td); | void thread_suspend_one(struct thread *td); | |||||||||
void thread_unlink(struct thread *td); | void thread_unlink(struct thread *td); | |||||||||
void thread_unsuspend(struct proc *p); | void thread_unsuspend(struct proc *p); | |||||||||
void thread_wait(struct proc *p); | void thread_wait(struct proc *p); | |||||||||
void stop_all_proc_block(void); | bool stop_all_proc_block(void); | |||||||||
void stop_all_proc_unblock(void); | void stop_all_proc_unblock(void); | |||||||||
void stop_all_proc(void); | void stop_all_proc(void); | |||||||||
void resume_all_proc(void); | void resume_all_proc(void); | |||||||||
static __inline int | static __inline int | |||||||||
curthread_pflags_set(int flags) | curthread_pflags_set(int flags) | |||||||||
{ | { | |||||||||
struct thread *td; | struct thread *td; | |||||||||
▲ Show 20 Lines • Show All 81 Lines • Show Last 20 Lines |
Looks like it should be (c).