summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/state
diff options
context:
space:
mode:
authorAndrei Vagin <avagin@google.com>2020-08-03 22:06:46 -0700
committergVisor bot <gvisor-bot@google.com>2020-08-03 22:08:25 -0700
commit25798f214c6d1991916906ea8fca9e7029a8c423 (patch)
treee2240d0174da0d95a0a19660ea8c2bb0ebbf0082 /pkg/sentry/state
parentb5c9ff81922ba785d83eaccc464b0b15a8120798 (diff)
Add callbacks to support lazy loading/restoring thread states
PiperOrigin-RevId: 324748508
Diffstat (limited to 'pkg/sentry/state')
-rw-r--r--pkg/sentry/state/state.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/pkg/sentry/state/state.go b/pkg/sentry/state/state.go
index 9eb626b76..a06c9b8ab 100644
--- a/pkg/sentry/state/state.go
+++ b/pkg/sentry/state/state.go
@@ -60,6 +60,7 @@ type SaveOpts struct {
func (opts SaveOpts) Save(k *kernel.Kernel, w *watchdog.Watchdog) error {
log.Infof("Sandbox save started, pausing all tasks.")
k.Pause()
+ k.ReceiveTaskStates()
defer k.Unpause()
defer log.Infof("Tasks resumed after save.")