diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-01-27 23:45:00 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-01-27 23:45:00 +0000 |
commit | e26ce51d1a5e6ccdcf2dcb10aaf761e0264f7d51 (patch) | |
tree | a5a77be1c312396dd4e57482cb7213bf6f0a3910 /pkg/usermem/usermem_state_autogen.go | |
parent | 39fc573e80eca187af64379bbf178da39a94cd29 (diff) | |
parent | 0e2f1b7abd219f39d67cc2cecd00c441a13eeb29 (diff) |
Merge release-20200115.0-110-g0e2f1b7 (automated)
Diffstat (limited to 'pkg/usermem/usermem_state_autogen.go')
-rwxr-xr-x | pkg/usermem/usermem_state_autogen.go | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/pkg/usermem/usermem_state_autogen.go b/pkg/usermem/usermem_state_autogen.go new file mode 100755 index 000000000..39b92d108 --- /dev/null +++ b/pkg/usermem/usermem_state_autogen.go @@ -0,0 +1,49 @@ +// automatically generated by stateify. + +package usermem + +import ( + "gvisor.dev/gvisor/pkg/state" +) + +func (x *AccessType) beforeSave() {} +func (x *AccessType) save(m state.Map) { + x.beforeSave() + m.Save("Read", &x.Read) + m.Save("Write", &x.Write) + m.Save("Execute", &x.Execute) +} + +func (x *AccessType) afterLoad() {} +func (x *AccessType) load(m state.Map) { + m.Load("Read", &x.Read) + m.Load("Write", &x.Write) + m.Load("Execute", &x.Execute) +} + +func (x *Addr) save(m state.Map) { + m.SaveValue("", (uintptr)(*x)) +} + +func (x *Addr) load(m state.Map) { + m.LoadValue("", new(uintptr), func(y interface{}) { *x = (Addr)(y.(uintptr)) }) +} + +func (x *AddrRange) beforeSave() {} +func (x *AddrRange) save(m state.Map) { + x.beforeSave() + m.Save("Start", &x.Start) + m.Save("End", &x.End) +} + +func (x *AddrRange) afterLoad() {} +func (x *AddrRange) load(m state.Map) { + m.Load("Start", &x.Start) + m.Load("End", &x.End) +} + +func init() { + state.Register("usermem.AccessType", (*AccessType)(nil), state.Fns{Save: (*AccessType).save, Load: (*AccessType).load}) + state.Register("usermem.Addr", (*Addr)(nil), state.Fns{Save: (*Addr).save, Load: (*Addr).load}) + state.Register("usermem.AddrRange", (*AddrRange)(nil), state.Fns{Save: (*AddrRange).save, Load: (*AddrRange).load}) +} |