When a team died, only the time of its children were added to its parent
dead children time counters - not its own time. Moved time calculation to team_remove_team(). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14464 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
22876ee340
commit
a4c373515e
@ -745,6 +745,14 @@ delete_team_struct(struct team *team)
|
||||
void
|
||||
team_remove_team(struct team *team, struct process_group **_freeGroup)
|
||||
{
|
||||
struct team *parent = team->parent;
|
||||
|
||||
// remember how long this team lasted
|
||||
parent->dead_children.kernel_time += team->dead_threads_kernel_time
|
||||
+ team->dead_children.kernel_time;
|
||||
parent->dead_children.user_time += team->dead_threads_user_time
|
||||
+ team->dead_children.user_time;
|
||||
|
||||
hash_remove(team_hash, team);
|
||||
sUsedTeams--;
|
||||
|
||||
@ -756,8 +764,8 @@ team_remove_team(struct team *team, struct process_group **_freeGroup)
|
||||
// remove us from our process group
|
||||
remove_team_from_group(team, _freeGroup);
|
||||
|
||||
// remove us from our parent
|
||||
remove_team_from_parent(team->parent, team);
|
||||
// remove us from our parent
|
||||
remove_team_from_parent(parent, team);
|
||||
}
|
||||
|
||||
|
||||
|
@ -945,10 +945,6 @@ thread_exit(void)
|
||||
groupDeadSem = team->group->dead_child_sem;
|
||||
}
|
||||
|
||||
// remember how long this team lasted
|
||||
parent->dead_children.kernel_time += team->dead_threads_kernel_time;
|
||||
parent->dead_children.user_time += team->dead_threads_user_time;
|
||||
|
||||
team_remove_team(team, &freeGroup);
|
||||
}
|
||||
RELEASE_TEAM_LOCK();
|
||||
|
Loading…
Reference in New Issue
Block a user