Lines Matching refs:parent

434 	hash_next = siblings_next = parent = children = group_next = NULL;
547 // usually already NULL and transferred to the parent
633 /*! Locks the team and its parent team (if any).
636 If the team doesn't have a parent, only the team itself is locked. If the
637 team's parent is the kernel team and \a dontLockParentIfKernel is \c true,
640 \param dontLockParentIfKernel If \c true, the team's parent team is only
646 // The locking order is parent -> child. Since the parent can change as long
651 // If the team doesn't have a parent, we're done. Otherwise try to lock
652 // the parent.This will succeed in most cases, simplifying things.
653 Team* parent = this->parent;
654 if (parent == NULL || (dontLockParentIfKernel && parent == sKernelTeam)
655 || parent->TryLock()) {
659 // get a temporary reference to the parent, unlock this team, lock the
660 // parent, and re-lock this team
661 BReference<Team> parentReference(parent);
664 parent->Lock();
667 // If the parent hasn't changed in the meantime, we're done.
668 if (this->parent == parent)
671 // The parent has changed -- unlock and retry.
672 parent->Unlock();
677 /*! Unlocks the team and its parent team (if any).
682 if (parent != NULL)
683 parent->Unlock();
689 /*! Locks the team, its parent team (if any), and the team's process group.
692 If the team doesn't have a parent, only the team itself is locked.
699 // We hold the group's and the team's lock, but not the parent team's lock.
700 // If we have a parent, try to lock it.
701 if (this->parent == NULL || this->parent->TryLock())
711 /*! Unlocks the team, its parent team (if any), and the team's process group.
718 if (parent != NULL)
719 parent->Unlock();
821 Team::InheritSignalActions(Team* parent)
823 memcpy(fSignalActions, parent->fSignalActions, sizeof(fSignalActions));
1075 // Orphaned Process Group: "A process group in which the parent of every
1084 Team* parent = team->parent;
1085 if (parent != NULL && parent->group_id != id
1086 && parent->session_id == fSession->id) {
1152 kprintf("parent: %p", team->parent);
1153 if (team->parent != NULL) {
1154 kprintf(" (id = %" B_PRId32 ")\n", team->parent->id);
1218 B_PRINTF_POINTER_WIDTH, "parent");
1222 kprintf("%p%7" B_PRId32 " %p %s\n", team, team->id, team->parent, team->Name());
1232 /*! Get the parent of a given process.
1235 parent, only) as well as in user_process_info where the information is
1249 if (team->parent == NULL) {
1253 return team->parent->id;
1264 if (team->parent == NULL) {
1268 parentID = team->parent->id;
1276 /*! Inserts team \a team into the child list of team \a parent.
1278 The caller must hold the lock of both \a parent and \a team.
1280 \param parent The parent team.
1281 \param team The team to be inserted into \a parent's child list.
1284 insert_team_into_parent(Team* parent, Team* team)
1286 ASSERT(parent != NULL);
1288 team->siblings_next = parent->children;
1289 parent->children = team;
1290 team->parent = parent;
1294 /*! Removes team \a team from the child list of team \a parent.
1296 The caller must hold the lock of both \a parent and \a team.
1298 \param parent The parent team.
1299 \param team The team to be removed from \a parent's child list.
1302 remove_team_from_parent(Team* parent, Team* team)
1307 for (child = parent->children; child != NULL;
1311 parent->children = child->siblings_next;
1315 team->parent = NULL;
1345 team's parent's lock.
1363 team's parent's lock. Interrupts must be enabled.
1781 // get the parent team
1782 Team* parent = Team::Get(parentID);
1783 if (parent == NULL)
1785 BReference<Team> parentReference(parent, true);
1787 parent->LockTeamAndProcessGroup();
1790 // inherit the parent's user/group
1791 inherit_parent_user_and_group(team, parent);
1793 // get a reference to the parent's I/O context -- we need it to create ours
1794 parentIOContext = parent->io_context;
1798 parent->UnlockTeamAndProcessGroup();
1818 // We don't need the parent's I/O context any longer.
1839 // insert the team into its parent and the teams hash
1840 parent->LockTeamAndProcessGroup();
1852 insert_team_into_parent(parent, team);
1853 insert_team_into_group(parent->group, team);
1856 parent->UnlockTeamAndProcessGroup();
1919 // Remove the team structure from the process group, the parent team, and
1921 parent->LockTeamAndProcessGroup();
1925 remove_team_from_parent(team->parent, team);
1928 parent->UnlockTeamAndProcessGroup();
2144 // Inherit the parent's user/group.
2218 panic("user data area not found, parent area is %" B_PRId32,
2239 // insert the team into its parent and the teams hash
2288 // Remove the team structure from the process group, the parent team, and
2294 remove_team_from_parent(team->parent, team);
2322 /*! Returns if the specified team \a parent has any children belonging to the
2324 The caller must hold \a parent's lock.
2327 has_children_in_group(Team* parent, pid_t groupID)
2329 for (Team* child = parent->children; child != NULL;
2541 childrenExist = childTeam->parent == team;
2715 if (team->parent != NULL)
2716 info->parent = team->parent->id;
2718 info->parent = -1;
2736 // the parent team's lock guards the job control entry -- acquire it
2978 // remove the entry only, if the caller is the parent of the found team
3107 group, and from its parent.
3113 - \a team's parent team's lock (might be the kernel team), and
3119 Team* parent = team->parent;
3122 parent->dead_children.kernel_time += team->dead_threads_kernel_time
3124 parent->dead_children.user_time += team->dead_threads_user_time
3134 // possible from its process group and its parent and children, but that
3191 // remove us from our parent
3192 remove_team_from_parent(parent, team);
3410 The caller must hold the parent team's lock. Interrupts are allowed to be
3416 entry before releasing the parent team's lock, unless the new state is
3445 team->parent->stopped_children.entries.Remove(entry);
3448 team->parent->continued_children.entries.Remove(entry);
3466 childList = &team->parent->dead_children;
3467 team->parent->dead_children.count++;
3470 childList = &team->parent->stopped_children;
3473 childList = &team->parent->continued_children;
3479 team->parent->dead_children.condition_variable.NotifyAll();
4096 // setpgid() can be called either by the parent of the target process or
4196 // also lock the target team and its parent
4198 TeamLocker parentLocker(team->parent, true);
4212 if (team->parent != currentTeam
4244 // parent waiting in wait_for_child(). Hence we notify it.
4245 team->parent->dead_children.condition_variable.NotifyAll();
4269 // lock the team's current process group, parent, and the team itself
4273 TeamLocker parentLocker(team->parent, true);
4286 // parent waiting in wait_for_child(). Hence we notify it.
4287 team->parent->dead_children.condition_variable.NotifyAll();