summaryrefslogtreecommitdiff
path: root/proc
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1999-06-05 21:18:38 +0000
committerRoland McGrath <roland@gnu.org>1999-06-05 21:18:38 +0000
commit24e51adeb213496b1842222da58a47cccdbc9184 (patch)
treed5d7c40bd71f0cce2fde7468e5040994fec85f2a /proc
parentfe62c3c56265801efa19edeea1bad9de02c72911 (diff)
1999-06-05 Roland McGrath <roland@baalperazim.frob.com>
* proc.h (struct proc): Use unsigned int for flag bitfields. * mgt.c (allocate_proc, complete_proc): New functions, broken out of new_proc. Remove magic handling of PIDs 0 and 1. (new_proc): Now just call those two. Made static. (create_startup_proc): New function, also broken out of old new_proc. Do special setup for PID 1 (init) proc structure here. * proc.h: Update decls. * main.c (main): Use create_startup_proc for startup_proc, and allocate_proc + complete_proc (with PID 0) for self_proc.
Diffstat (limited to 'proc')
-rw-r--r--proc/proc.h32
1 files changed, 17 insertions, 15 deletions
diff --git a/proc/proc.h b/proc/proc.h
index 1190d99e..dcc649c7 100644
--- a/proc/proc.h
+++ b/proc/proc.h
@@ -65,20 +65,20 @@ struct proc
int p_status; /* to return via wait */
int p_sigcode;
- int p_exec:1; /* has called proc_mark_exec */
- int p_stopped:1; /* has called proc_mark_stop */
- int p_waited:1; /* stop has been reported to parent */
- int p_exiting:1; /* has called proc_mark_exit */
- int p_waiting:1; /* blocked in wait */
- int p_traced:1; /* has called proc_mark_traced */
- int p_nostopcld:1; /* has called proc_mark_nostopchild */
- int p_parentset:1; /* has had a parent set with proc_child */
- int p_deadmsg:1; /* hang on requests for a message port */
- int p_checkmsghangs:1; /* someone is currently hanging on us */
- int p_msgportwait:1; /* blocked in getmsgport */
- int p_noowner:1; /* has no owner known */
- int p_loginleader:1; /* leader of login collection */
- int p_dead:1; /* process is dead */
+ unsigned int p_exec:1; /* has called proc_mark_exec */
+ unsigned int p_stopped:1; /* has called proc_mark_stop */
+ unsigned int p_waited:1; /* stop has been reported to parent */
+ unsigned int p_exiting:1; /* has called proc_mark_exit */
+ unsigned int p_waiting:1; /* blocked in wait */
+ unsigned int p_traced:1; /* has called proc_mark_traced */
+ unsigned int p_nostopcld:1; /* has called proc_mark_nostopchild */
+ unsigned int p_parentset:1; /* has had a parent set with proc_child */
+ unsigned int p_deadmsg:1; /* hang on requests for a message port */
+ unsigned int p_checkmsghangs:1; /* someone is currently hanging on us */
+ unsigned int p_msgportwait:1; /* blocked in getmsgport */
+ unsigned int p_noowner:1; /* has no owner known */
+ unsigned int p_loginleader:1; /* leader of login collection */
+ unsigned int p_dead:1; /* process is dead */
};
typedef struct proc *pstruct_t;
@@ -190,7 +190,9 @@ void exc_clean (void *);
struct proc *add_tasks (task_t);
int pidfree (pid_t);
-struct proc *new_proc (task_t);
+struct proc *create_startup_proc (void);
+struct proc *allocate_proc (task_t);
+void complete_proc (struct proc *, pid_t);
void leave_pgrp (struct proc *);
void join_pgrp (struct proc *);