* We're now using an anonymous condition variable for the team's dead children
instead of publishing it. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26789 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -769,7 +769,7 @@ create_team_struct(const char *name, bool kernel)
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
// publish dead/stopped/continued children condition vars
|
// publish dead/stopped/continued children condition vars
|
||||||
team->dead_children->condition_variable.Publish(team->dead_children,
|
team->dead_children->condition_variable.Init(team->dead_children,
|
||||||
"team children");
|
"team children");
|
||||||
|
|
||||||
// keep all allocated structures
|
// keep all allocated structures
|
||||||
@@ -786,8 +786,6 @@ create_team_struct(const char *name, bool kernel)
|
|||||||
static void
|
static void
|
||||||
delete_team_struct(struct team *team)
|
delete_team_struct(struct team *team)
|
||||||
{
|
{
|
||||||
team->dead_children->condition_variable.Unpublish();
|
|
||||||
|
|
||||||
while (death_entry* threadDeathEntry = (death_entry*)list_remove_head_item(
|
while (death_entry* threadDeathEntry = (death_entry*)list_remove_head_item(
|
||||||
&team->dead_threads)) {
|
&team->dead_threads)) {
|
||||||
free(threadDeathEntry);
|
free(threadDeathEntry);
|
||||||
@@ -1756,7 +1754,7 @@ wait_for_child(pid_t child, uint32 flags, int32 *_reason,
|
|||||||
ConditionVariableEntry deadWaitEntry;
|
ConditionVariableEntry deadWaitEntry;
|
||||||
|
|
||||||
if (status == B_WOULD_BLOCK && (flags & WNOHANG) == 0)
|
if (status == B_WOULD_BLOCK && (flags & WNOHANG) == 0)
|
||||||
deadWaitEntry.Add(team->dead_children);
|
team->dead_children->condition_variable.Add(&deadWaitEntry);
|
||||||
|
|
||||||
locker.Unlock();
|
locker.Unlock();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user