summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/memmap
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-02-06 06:49:12 +0000
committergVisor bot <gvisor-bot@google.com>2020-02-06 06:49:12 +0000
commit971856a97882eee6fc216b12e8e20bba0f14c231 (patch)
tree9a71fe33a8c62ffd2bfa29bc27d59722b9412f60 /pkg/sentry/memmap
parentb3a9b1da3837ba2636e621467bb56aad942caf5c (diff)
parent1b6a12a768216a99a5e0428c42ea4faf79cf3b50 (diff)
Merge release-20200127.0-85-g1b6a12a (automated)
Diffstat (limited to 'pkg/sentry/memmap')
-rwxr-xr-xpkg/sentry/memmap/memmap_impl_state_autogen.go63
-rwxr-xr-xpkg/sentry/memmap/memmap_state_autogen.go53
2 files changed, 63 insertions, 53 deletions
diff --git a/pkg/sentry/memmap/memmap_impl_state_autogen.go b/pkg/sentry/memmap/memmap_impl_state_autogen.go
new file mode 100755
index 000000000..53cebac8c
--- /dev/null
+++ b/pkg/sentry/memmap/memmap_impl_state_autogen.go
@@ -0,0 +1,63 @@
+// automatically generated by stateify.
+
+package memmap
+
+import (
+ "gvisor.dev/gvisor/pkg/state"
+)
+
+func (x *MappingSet) beforeSave() {}
+func (x *MappingSet) save(m state.Map) {
+ x.beforeSave()
+ var root *MappingSegmentDataSlices = x.saveRoot()
+ m.SaveValue("root", root)
+}
+
+func (x *MappingSet) afterLoad() {}
+func (x *MappingSet) load(m state.Map) {
+ m.LoadValue("root", new(*MappingSegmentDataSlices), func(y interface{}) { x.loadRoot(y.(*MappingSegmentDataSlices)) })
+}
+
+func (x *Mappingnode) beforeSave() {}
+func (x *Mappingnode) save(m state.Map) {
+ x.beforeSave()
+ m.Save("nrSegments", &x.nrSegments)
+ m.Save("parent", &x.parent)
+ m.Save("parentIndex", &x.parentIndex)
+ m.Save("hasChildren", &x.hasChildren)
+ m.Save("keys", &x.keys)
+ m.Save("values", &x.values)
+ m.Save("children", &x.children)
+}
+
+func (x *Mappingnode) afterLoad() {}
+func (x *Mappingnode) load(m state.Map) {
+ m.Load("nrSegments", &x.nrSegments)
+ m.Load("parent", &x.parent)
+ m.Load("parentIndex", &x.parentIndex)
+ m.Load("hasChildren", &x.hasChildren)
+ m.Load("keys", &x.keys)
+ m.Load("values", &x.values)
+ m.Load("children", &x.children)
+}
+
+func (x *MappingSegmentDataSlices) beforeSave() {}
+func (x *MappingSegmentDataSlices) save(m state.Map) {
+ x.beforeSave()
+ m.Save("Start", &x.Start)
+ m.Save("End", &x.End)
+ m.Save("Values", &x.Values)
+}
+
+func (x *MappingSegmentDataSlices) afterLoad() {}
+func (x *MappingSegmentDataSlices) load(m state.Map) {
+ m.Load("Start", &x.Start)
+ m.Load("End", &x.End)
+ m.Load("Values", &x.Values)
+}
+
+func init() {
+ state.Register("memmap.MappingSet", (*MappingSet)(nil), state.Fns{Save: (*MappingSet).save, Load: (*MappingSet).load})
+ state.Register("memmap.Mappingnode", (*Mappingnode)(nil), state.Fns{Save: (*Mappingnode).save, Load: (*Mappingnode).load})
+ state.Register("memmap.MappingSegmentDataSlices", (*MappingSegmentDataSlices)(nil), state.Fns{Save: (*MappingSegmentDataSlices).save, Load: (*MappingSegmentDataSlices).load})
+}
diff --git a/pkg/sentry/memmap/memmap_state_autogen.go b/pkg/sentry/memmap/memmap_state_autogen.go
index 2d0814ab1..16107f949 100755
--- a/pkg/sentry/memmap/memmap_state_autogen.go
+++ b/pkg/sentry/memmap/memmap_state_autogen.go
@@ -34,60 +34,7 @@ func (x *MappingOfRange) load(m state.Map) {
m.Load("Writable", &x.Writable)
}
-func (x *MappingSet) beforeSave() {}
-func (x *MappingSet) save(m state.Map) {
- x.beforeSave()
- var root *MappingSegmentDataSlices = x.saveRoot()
- m.SaveValue("root", root)
-}
-
-func (x *MappingSet) afterLoad() {}
-func (x *MappingSet) load(m state.Map) {
- m.LoadValue("root", new(*MappingSegmentDataSlices), func(y interface{}) { x.loadRoot(y.(*MappingSegmentDataSlices)) })
-}
-
-func (x *Mappingnode) beforeSave() {}
-func (x *Mappingnode) save(m state.Map) {
- x.beforeSave()
- m.Save("nrSegments", &x.nrSegments)
- m.Save("parent", &x.parent)
- m.Save("parentIndex", &x.parentIndex)
- m.Save("hasChildren", &x.hasChildren)
- m.Save("keys", &x.keys)
- m.Save("values", &x.values)
- m.Save("children", &x.children)
-}
-
-func (x *Mappingnode) afterLoad() {}
-func (x *Mappingnode) load(m state.Map) {
- m.Load("nrSegments", &x.nrSegments)
- m.Load("parent", &x.parent)
- m.Load("parentIndex", &x.parentIndex)
- m.Load("hasChildren", &x.hasChildren)
- m.Load("keys", &x.keys)
- m.Load("values", &x.values)
- m.Load("children", &x.children)
-}
-
-func (x *MappingSegmentDataSlices) beforeSave() {}
-func (x *MappingSegmentDataSlices) save(m state.Map) {
- x.beforeSave()
- m.Save("Start", &x.Start)
- m.Save("End", &x.End)
- m.Save("Values", &x.Values)
-}
-
-func (x *MappingSegmentDataSlices) afterLoad() {}
-func (x *MappingSegmentDataSlices) load(m state.Map) {
- m.Load("Start", &x.Start)
- m.Load("End", &x.End)
- m.Load("Values", &x.Values)
-}
-
func init() {
state.Register("memmap.MappableRange", (*MappableRange)(nil), state.Fns{Save: (*MappableRange).save, Load: (*MappableRange).load})
state.Register("memmap.MappingOfRange", (*MappingOfRange)(nil), state.Fns{Save: (*MappingOfRange).save, Load: (*MappingOfRange).load})
- state.Register("memmap.MappingSet", (*MappingSet)(nil), state.Fns{Save: (*MappingSet).save, Load: (*MappingSet).load})
- state.Register("memmap.Mappingnode", (*Mappingnode)(nil), state.Fns{Save: (*Mappingnode).save, Load: (*Mappingnode).load})
- state.Register("memmap.MappingSegmentDataSlices", (*MappingSegmentDataSlices)(nil), state.Fns{Save: (*MappingSegmentDataSlices).save, Load: (*MappingSegmentDataSlices).load})
}