Added new process_session/process_group structures, and added all fields

to the team structure to support these concepts.
Moved the dead_children stuff into a sub-structure.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9346 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2004-10-14 14:32:58 +00:00
parent b821b7715a
commit 07265ad7c5
1 changed files with 26 additions and 4 deletions

View File

@ -62,22 +62,44 @@ struct death_entry {
uint32 reason;
};
struct process_session {
pid_t id;
struct list groups;
};
struct process_group {
struct list_link link;
struct process_session *session;
pid_t id;
sem_id dead_child_sem;
struct team *teams;
};
#define MAX_DEAD_CHILDREN 32
// this is a soft limit for the number of dead entries in a team
struct team {
struct team *next; /* next team in the hash */
struct team *siblings_next;
struct team *parent;
struct team *children;
struct team *group_next;
team_id id;
team_id group_id;
team_id session_id;
pid_t group_id;
pid_t session_id;
struct process_group *group;
char name[B_OS_NAME_LENGTH];
int num_threads; /* number of threads in this team */
int state; /* current team state, see above */
int pending_signals;
void *io_context;
sem_id death_sem; /* semaphore to wait on for dying threads */
sem_id dead_child_sem; /* wait for dead child entries */
struct list dead_children;
struct {
sem_id sem; /* wait for dead child entries */
struct list list;
uint32 count;
int32 wait_for_any; /* count of wait_for_child() that wait for any child */
} dead_children;
vm_address_space *aspace;
vm_address_space *kaspace;
addr_t user_env_base;