From 07265ad7c544af88a7b9ca34e822d252645b04fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Thu, 14 Oct 2004 14:32:58 +0000 Subject: [PATCH] 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 --- headers/private/kernel/thread_types.h | 30 +++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/headers/private/kernel/thread_types.h b/headers/private/kernel/thread_types.h index 506e3143d2..d05d277cfb 100644 --- a/headers/private/kernel/thread_types.h +++ b/headers/private/kernel/thread_types.h @@ -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;