mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Add kernel.TaskSet.IsExiting().
PiperOrigin-RevId: 667150885
This commit is contained in:
@@ -192,6 +192,13 @@ func (ts *TaskSet) Kill(ws linux.WaitStatus) {
|
||||
}
|
||||
}
|
||||
|
||||
// IsExiting returns true if all tasks in ts are exiting or have exited.
|
||||
func (ts *TaskSet) IsExiting() bool {
|
||||
ts.mu.Lock()
|
||||
defer ts.mu.Unlock()
|
||||
return ts.Root.exiting
|
||||
}
|
||||
|
||||
// advanceExitStateLocked checks that t's current exit state is oldExit, then
|
||||
// sets it to newExit. If t's current exit state is not oldExit,
|
||||
// advanceExitStateLocked panics.
|
||||
|
||||
Reference in New Issue
Block a user