github.com/ttpreport/gvisor-ligolo@v0.0.0-20240123134145-a858404967ba/pkg/sentry/platform/systrap/systrap_state_autogen.go (about) 1 // automatically generated by stateify. 2 3 package systrap 4 5 import ( 6 "github.com/ttpreport/gvisor-ligolo/pkg/state" 7 ) 8 9 func (l *contextList) StateTypeName() string { 10 return "pkg/sentry/platform/systrap.contextList" 11 } 12 13 func (l *contextList) StateFields() []string { 14 return []string{ 15 "head", 16 "tail", 17 } 18 } 19 20 func (l *contextList) beforeSave() {} 21 22 // +checklocksignore 23 func (l *contextList) StateSave(stateSinkObject state.Sink) { 24 l.beforeSave() 25 stateSinkObject.Save(0, &l.head) 26 stateSinkObject.Save(1, &l.tail) 27 } 28 29 func (l *contextList) afterLoad() {} 30 31 // +checklocksignore 32 func (l *contextList) StateLoad(stateSourceObject state.Source) { 33 stateSourceObject.Load(0, &l.head) 34 stateSourceObject.Load(1, &l.tail) 35 } 36 37 func (e *contextEntry) StateTypeName() string { 38 return "pkg/sentry/platform/systrap.contextEntry" 39 } 40 41 func (e *contextEntry) StateFields() []string { 42 return []string{ 43 "next", 44 "prev", 45 } 46 } 47 48 func (e *contextEntry) beforeSave() {} 49 50 // +checklocksignore 51 func (e *contextEntry) StateSave(stateSinkObject state.Sink) { 52 e.beforeSave() 53 stateSinkObject.Save(0, &e.next) 54 stateSinkObject.Save(1, &e.prev) 55 } 56 57 func (e *contextEntry) afterLoad() {} 58 59 // +checklocksignore 60 func (e *contextEntry) StateLoad(stateSourceObject state.Source) { 61 stateSourceObject.Load(0, &e.next) 62 stateSourceObject.Load(1, &e.prev) 63 } 64 65 func (r *subprocessRefs) StateTypeName() string { 66 return "pkg/sentry/platform/systrap.subprocessRefs" 67 } 68 69 func (r *subprocessRefs) StateFields() []string { 70 return []string{ 71 "refCount", 72 } 73 } 74 75 func (r *subprocessRefs) beforeSave() {} 76 77 // +checklocksignore 78 func (r *subprocessRefs) StateSave(stateSinkObject state.Sink) { 79 r.beforeSave() 80 stateSinkObject.Save(0, &r.refCount) 81 } 82 83 // +checklocksignore 84 func (r *subprocessRefs) StateLoad(stateSourceObject state.Source) { 85 stateSourceObject.Load(0, &r.refCount) 86 stateSourceObject.AfterLoad(r.afterLoad) 87 } 88 89 func init() { 90 state.Register((*contextList)(nil)) 91 state.Register((*contextEntry)(nil)) 92 state.Register((*subprocessRefs)(nil)) 93 }