* Replaced the team::dead_children::sem semaphore by a condition
variable. Due to C code including the header I had to turn it from and aggregated member to a pointer. I'm very close to starting to convert all remaining .c to .cpp files. :-/ * Got rid of the "waiters" field. It was only written, never read. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22084 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -82,6 +82,27 @@ struct team_watcher {
|
||||
#define MAX_DEAD_CHILDREN 32
|
||||
// this is a soft limit for the number of dead entries in a team
|
||||
|
||||
typedef struct team_dead_children team_dead_children;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
#include <condition_variable.h>
|
||||
|
||||
struct team_dead_children {
|
||||
ConditionVariable<team_dead_children> condition_variable;
|
||||
// wait for dead child entries
|
||||
struct list list;
|
||||
uint32 count;
|
||||
vint32 wait_for_any; // count of wait_for_child() that wait for any
|
||||
// child
|
||||
bigtime_t kernel_time;
|
||||
bigtime_t user_time;
|
||||
};
|
||||
|
||||
#endif // __cplusplus
|
||||
|
||||
|
||||
struct team {
|
||||
struct team *next; // next in hash
|
||||
struct team *siblings_next;
|
||||
@@ -99,15 +120,7 @@ struct team {
|
||||
int pending_signals;
|
||||
void *io_context;
|
||||
sem_id death_sem; // semaphore to wait on for dying threads
|
||||
struct {
|
||||
sem_id sem; // wait for dead child entries
|
||||
struct list list;
|
||||
uint32 count;
|
||||
vint32 wait_for_any; // count of wait_for_child() that wait for any child
|
||||
int32 waiters; // count of all threads waiting for dead children sem
|
||||
bigtime_t kernel_time;
|
||||
bigtime_t user_time;
|
||||
} dead_children;
|
||||
team_dead_children *dead_children;
|
||||
struct vm_address_space *address_space;
|
||||
struct thread *main_thread;
|
||||
struct thread *thread_list;
|
||||
|
||||
Reference in New Issue
Block a user