github.com/nicocha30/gvisor-ligolo@v0.0.0-20230726075806-989fa2c0a413/pkg/ilist/ilist_state_autogen.go (about) 1 // automatically generated by stateify. 2 3 package ilist 4 5 import ( 6 "github.com/nicocha30/gvisor-ligolo/pkg/state" 7 ) 8 9 func (l *List) StateTypeName() string { 10 return "pkg/ilist.List" 11 } 12 13 func (l *List) StateFields() []string { 14 return []string{ 15 "head", 16 "tail", 17 } 18 } 19 20 func (l *List) beforeSave() {} 21 22 // +checklocksignore 23 func (l *List) StateSave(stateSinkObject state.Sink) { 24 l.beforeSave() 25 stateSinkObject.Save(0, &l.head) 26 stateSinkObject.Save(1, &l.tail) 27 } 28 29 func (l *List) afterLoad() {} 30 31 // +checklocksignore 32 func (l *List) StateLoad(stateSourceObject state.Source) { 33 stateSourceObject.Load(0, &l.head) 34 stateSourceObject.Load(1, &l.tail) 35 } 36 37 func (e *Entry) StateTypeName() string { 38 return "pkg/ilist.Entry" 39 } 40 41 func (e *Entry) StateFields() []string { 42 return []string{ 43 "next", 44 "prev", 45 } 46 } 47 48 func (e *Entry) beforeSave() {} 49 50 // +checklocksignore 51 func (e *Entry) StateSave(stateSinkObject state.Sink) { 52 e.beforeSave() 53 stateSinkObject.Save(0, &e.next) 54 stateSinkObject.Save(1, &e.prev) 55 } 56 57 func (e *Entry) afterLoad() {} 58 59 // +checklocksignore 60 func (e *Entry) StateLoad(stateSourceObject state.Source) { 61 stateSourceObject.Load(0, &e.next) 62 stateSourceObject.Load(1, &e.prev) 63 } 64 65 func init() { 66 state.Register((*List)(nil)) 67 state.Register((*Entry)(nil)) 68 }