// automatically generated by stateify. package lock import ( "gvisor.dev/gvisor/pkg/state" ) func (x *Lock) beforeSave() {} func (x *Lock) save(m state.Map) { x.beforeSave() m.Save("Readers", &x.Readers) m.Save("HasWriter", &x.HasWriter) m.Save("Writer", &x.Writer) } func (x *Lock) afterLoad() {} func (x *Lock) load(m state.Map) { m.Load("Readers", &x.Readers) m.Load("HasWriter", &x.HasWriter) m.Load("Writer", &x.Writer) } func (x *Locks) beforeSave() {} func (x *Locks) save(m state.Map) { x.beforeSave() if !state.IsZeroValue(x.blockedQueue) { m.Failf("blockedQueue is %v, expected zero", x.blockedQueue) } m.Save("locks", &x.locks) } func (x *Locks) afterLoad() {} func (x *Locks) load(m state.Map) { m.Load("locks", &x.locks) } func (x *LockRange) beforeSave() {} func (x *LockRange) save(m state.Map) { x.beforeSave() m.Save("Start", &x.Start) m.Save("End", &x.End) } func (x *LockRange) afterLoad() {} func (x *LockRange) load(m state.Map) { m.Load("Start", &x.Start) m.Load("End", &x.End) } func (x *LockSet) beforeSave() {} func (x *LockSet) save(m state.Map) { x.beforeSave() var root *LockSegmentDataSlices = x.saveRoot() m.SaveValue("root", root) } func (x *LockSet) afterLoad() {} func (x *LockSet) load(m state.Map) { m.LoadValue("root", new(*LockSegmentDataSlices), func(y interface{}) { x.loadRoot(y.(*LockSegmentDataSlices)) }) } func (x *Locknode) beforeSave() {} func (x *Locknode) 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 *Locknode) afterLoad() {} func (x *Locknode) 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 *LockSegmentDataSlices) beforeSave() {} func (x *LockSegmentDataSlices) save(m state.Map) { x.beforeSave() m.Save("Start", &x.Start) m.Save("End", &x.End) m.Save("Values", &x.Values) } func (x *LockSegmentDataSlices) afterLoad() {} func (x *LockSegmentDataSlices) load(m state.Map) { m.Load("Start", &x.Start) m.Load("End", &x.End) m.Load("Values", &x.Values) } func init() { state.Register("pkg/sentry/fs/lock.Lock", (*Lock)(nil), state.Fns{Save: (*Lock).save, Load: (*Lock).load}) state.Register("pkg/sentry/fs/lock.Locks", (*Locks)(nil), state.Fns{Save: (*Locks).save, Load: (*Locks).load}) state.Register("pkg/sentry/fs/lock.LockRange", (*LockRange)(nil), state.Fns{Save: (*LockRange).save, Load: (*LockRange).load}) state.Register("pkg/sentry/fs/lock.LockSet", (*LockSet)(nil), state.Fns{Save: (*LockSet).save, Load: (*LockSet).load}) state.Register("pkg/sentry/fs/lock.Locknode", (*Locknode)(nil), state.Fns{Save: (*Locknode).save, Load: (*Locknode).load}) state.Register("pkg/sentry/fs/lock.LockSegmentDataSlices", (*LockSegmentDataSlices)(nil), state.Fns{Save: (*LockSegmentDataSlices).save, Load: (*LockSegmentDataSlices).load}) }