diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-08-04 05:11:21 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-08-04 05:11:21 +0000 |
commit | d55f2a5f236090aa6f5ac4d4182acaec83fe568e (patch) | |
tree | cce1b6ee1f977afda3e439c76d75ee19d42c55c4 /pkg/sentry/kernel/task_stop.go | |
parent | d6c0fc04b85efe930627576bbb5d25edcb98be44 (diff) | |
parent | 25798f214c6d1991916906ea8fca9e7029a8c423 (diff) |
Merge release-20200622.1-318-g25798f214 (automated)
Diffstat (limited to 'pkg/sentry/kernel/task_stop.go')
-rw-r--r-- | pkg/sentry/kernel/task_stop.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/pkg/sentry/kernel/task_stop.go b/pkg/sentry/kernel/task_stop.go index 10c6e455c..296735d32 100644 --- a/pkg/sentry/kernel/task_stop.go +++ b/pkg/sentry/kernel/task_stop.go @@ -205,6 +205,22 @@ func (ts *TaskSet) BeginExternalStop() { } } +// PullFullState receives full states for all tasks. +func (ts *TaskSet) PullFullState() { + ts.mu.Lock() + defer ts.mu.Unlock() + if ts.Root == nil { + return + } + for t := range ts.Root.tids { + t.Activate() + if mm := t.MemoryManager(); mm != nil { + t.p.PullFullState(t.MemoryManager().AddressSpace(), t.Arch()) + } + t.Deactivate() + } +} + // EndExternalStop indicates the end of an external stop started by a previous // call to TaskSet.BeginExternalStop. EndExternalStop does not wait for task // goroutines to resume. |