Lines Matching defs:team

32 #include <team.h>
184 team holds a reference and the reference count is one greater than the
274 Also enforces the current team's signal queuing limit.
297 = thread_get_current_thread()->team->QueuedSignalsCounter();
317 Team* team = thread_get_current_thread()->team;
322 fSendingProcess = team->id;
323 fSendingUser = team->effective_uid;
756 The caller must hold \c team->signal_lock.
771 The caller must hold \c team->signal_lock.
780 /*! Updates all of the given team's threads' Thread::flags fields according to
785 update_team_threads_signal_flag(Team* team)
787 for (Thread* thread = team->thread_list; thread != NULL;
841 is pending in the given thread or its team.
845 The caller must hold \c team->signal_lock.
857 Team* team = thread->team;
859 if (team->HighestPendingSignalPriority(nonBlocked)
861 signal = team->DequeuePendingSignal(nonBlocked, buffer);
862 update_team_threads_signal_flag(team);
914 frameData.commpage_address = thread->team->commpage_address;
934 Team* team = thread->team;
936 TeamLocker teamLocker(team);
937 InterruptsSpinLocker locker(thread->team->signal_lock);
1002 // get pending non-blocked thread or team signal with the highest
1015 handler = team->SignalActionFor(signal->Number());
1023 team->SignalActionFor(signal->Number()).sa_handler = SIG_DFL;
1032 bool debugSignal = (~atomic_get(&team->debug_info.flags)
1098 // notify threads waiting for team state changes
1099 if (thread == team->main_thread) {
1100 team->LockTeamAndParent(false);
1102 team_set_job_control_state(team,
1105 team->UnlockTeamAndParent();
1126 team->LockProcessGroup();
1127 AutoLocker<ProcessGroup> groupLocker(team->group, true);
1129 && team->group->IsOrphaned()) {
1133 // notify threads waiting for team state changes
1134 if (thread == team->main_thread) {
1135 team->LockTeamAndParent(false);
1137 team_set_job_control_state(team,
1142 Team* parentTeam = team->parent;
1148 team->id);
1154 team->UnlockTeamAndParent();
1187 TRACE(("Shutting down team %" B_PRId32 " due to signal %"
1189 team->id, signal->Number(), thread->id));
1191 // This signal kills the team regardless which thread
1204 if (killTeam || thread == team->main_thread) {
1205 // The signal is terminal for the team or the thread is
1206 // the main thread. In either case the team is going
1210 if (!team->exit.initialized) {
1211 team->exit.reason = CLD_KILLED;
1212 team->exit.signal = signal->Number();
1213 team->exit.signaling_user = signal->SendingUser();
1214 team->exit.status = 0;
1215 team->exit.initialized = true;
1221 // so that the team terminates.
1222 if (thread != team->main_thread) {
1224 team->id);
1225 send_signal_to_thread_id(team->id, childSignal, 0);
1300 /*! Checks whether the given signal is blocked for the given team (i.e. all of
1302 The caller must hold the team's lock and \c signal_lock.
1305 is_team_signal_blocked(Team* team, int signal)
1309 for (Thread* thread = team->thread_list; thread != NULL;
1347 The caller must hold \c team->signal_lock.
1358 target team.
1360 \param team The target team.
1363 has_permission_to_signal(Team* team)
1366 uid_t currentUser = thread_get_current_thread()->team->effective_uid;
1369 // target team's
1370 return currentUser == 0 || currentUser == team->effective_uid;
1377 The caller must hold \c team->signal_lock.
1404 if (!has_permission_to_signal(thread->team))
1411 if (thread->team == team_get_kernel_team()) {
1428 // If sent to a thread other than the team's main thread, also send
1429 // a SIGKILLTHR to the main thread to kill the team.
1430 Thread* mainThread = thread->team->main_thread;
1550 SpinLocker locker(thread->team->signal_lock);
1595 /*! Sends the given signal to the given team.
1599 \param team The team the signal shall be sent to.
1617 send_signal_to_team_locked(Team* team, uint32 signalNumber, Signal* signal,
1622 T(SendSignal(team->id, signalNumber, flags));
1628 if (!has_permission_to_signal(team))
1635 if (team == team_get_kernel_team()) {
1636 // signals to the kernel team are not allowed
1641 team->AddPendingSignal(signal);
1643 team->AddPendingSignal(signalNumber);
1645 // the team has the signal reference, now
1654 // (only the main thread shuts down the team).
1655 Thread* mainThread = team->main_thread;
1674 for (Thread* thread = team->thread_list; thread != NULL;
1690 // remove any pending team stop signals
1691 team->RemovePendingSignals(STOP_SIGNALS);
1700 for (Thread* thread = team->thread_list; thread != NULL;
1705 // remove the stop signal from the team again
1707 team->RemovePendingSignal(signal);
1710 team->RemovePendingSignal(signalNumber);
1716 for (Thread* thread = team->thread_list; thread != NULL;
1728 update_team_threads_signal_flag(team);
1734 /*! Sends the given signal to the given team.
1736 \param team The team the signal shall be sent to.
1751 send_signal_to_team(Team* team, const Signal& signal, uint32 flags)
1761 InterruptsSpinLocker locker(team->signal_lock);
1763 error = send_signal_to_team_locked(team, signal.Number(), signalToQueue,
1775 /*! Sends the given signal to the team with the given ID.
1777 \param teamID The ID of the team the signal shall be sent to.
1794 // get the team
1795 Team* team = Team::Get(teamID);
1796 if (team == NULL)
1798 BReference<Team> teamReference(team, true);
1800 return send_signal_to_team(team, signal, flags);
1830 for (Team* team = group->teams; team != NULL; team = team->group_next) {
1831 status_t error = send_signal_to_team(team, signal,
1833 // If sending to the first team in the group failed, let the whole call
1851 The caller must not hold any process group, team, or thread lock. Interrupts
1905 B_OK, thread->team->id);
1918 // If id == -1, send the signal to all teams the calling team has permission
1922 // currently only send to the current team
1923 return send_signal_to_team_id(thread->team->id, signal, flags);
1957 InterruptsSpinLocker _(thread->team->signal_lock);
2005 // get and lock the team
2006 Team* team = thread_get_current_thread()->team;
2007 TeamLocker teamLocker(team);
2009 struct sigaction& teamHandler = team->SignalActionFor(signal);
2028 InterruptsSpinLocker locker(team->signal_lock);
2030 team->RemovePendingSignal(signal);
2032 for (Thread* thread = team->thread_list; thread != NULL;
2070 InterruptsSpinLocker locker(thread->team->signal_lock);
2163 InterruptsSpinLocker locker(thread->team->signal_lock);
2205 InterruptsSpinLocker locker(thread->team->signal_lock);
2219 thread with ID \a id, otherwise the team with the ID \a id.
2221 current thread, otherwise the current team.
2222 - \code id == -1 \endcode: The target are all teams the current team has
2271 B_OK, thread->team->id);
2274 // send to current team for id == 0, otherwise to the respective team
2500 InterruptsSpinLocker locker(thread->team->signal_lock);