github.com/ttpreport/gvisor-ligolo@v0.0.0-20240123134145-a858404967ba/pkg/sentry/kernel/kernel_unsafe_state_autogen.go (about) 1 // automatically generated by stateify. 2 3 package kernel 4 5 import ( 6 "github.com/ttpreport/gvisor-ligolo/pkg/state" 7 ) 8 9 func (p *descriptorBucketSliceAtomicPtr) StateTypeName() string { 10 return "pkg/sentry/kernel.descriptorBucketSliceAtomicPtr" 11 } 12 13 func (p *descriptorBucketSliceAtomicPtr) StateFields() []string { 14 return []string{ 15 "ptr", 16 } 17 } 18 19 func (p *descriptorBucketSliceAtomicPtr) beforeSave() {} 20 21 // +checklocksignore 22 func (p *descriptorBucketSliceAtomicPtr) StateSave(stateSinkObject state.Sink) { 23 p.beforeSave() 24 var ptrValue *descriptorBucketSlice 25 ptrValue = p.savePtr() 26 stateSinkObject.SaveValue(0, ptrValue) 27 } 28 29 func (p *descriptorBucketSliceAtomicPtr) afterLoad() {} 30 31 // +checklocksignore 32 func (p *descriptorBucketSliceAtomicPtr) StateLoad(stateSourceObject state.Source) { 33 stateSourceObject.LoadValue(0, new(*descriptorBucketSlice), func(y any) { p.loadPtr(y.(*descriptorBucketSlice)) }) 34 } 35 36 func (p *descriptorBucketAtomicPtr) StateTypeName() string { 37 return "pkg/sentry/kernel.descriptorBucketAtomicPtr" 38 } 39 40 func (p *descriptorBucketAtomicPtr) StateFields() []string { 41 return []string{ 42 "ptr", 43 } 44 } 45 46 func (p *descriptorBucketAtomicPtr) beforeSave() {} 47 48 // +checklocksignore 49 func (p *descriptorBucketAtomicPtr) StateSave(stateSinkObject state.Sink) { 50 p.beforeSave() 51 var ptrValue *descriptorBucket 52 ptrValue = p.savePtr() 53 stateSinkObject.SaveValue(0, ptrValue) 54 } 55 56 func (p *descriptorBucketAtomicPtr) afterLoad() {} 57 58 // +checklocksignore 59 func (p *descriptorBucketAtomicPtr) StateLoad(stateSourceObject state.Source) { 60 stateSourceObject.LoadValue(0, new(*descriptorBucket), func(y any) { p.loadPtr(y.(*descriptorBucket)) }) 61 } 62 63 func (p *descriptorAtomicPtr) StateTypeName() string { 64 return "pkg/sentry/kernel.descriptorAtomicPtr" 65 } 66 67 func (p *descriptorAtomicPtr) StateFields() []string { 68 return []string{ 69 "ptr", 70 } 71 } 72 73 func (p *descriptorAtomicPtr) beforeSave() {} 74 75 // +checklocksignore 76 func (p *descriptorAtomicPtr) StateSave(stateSinkObject state.Sink) { 77 p.beforeSave() 78 var ptrValue *descriptor 79 ptrValue = p.savePtr() 80 stateSinkObject.SaveValue(0, ptrValue) 81 } 82 83 func (p *descriptorAtomicPtr) afterLoad() {} 84 85 // +checklocksignore 86 func (p *descriptorAtomicPtr) StateLoad(stateSourceObject state.Source) { 87 stateSourceObject.LoadValue(0, new(*descriptor), func(y any) { p.loadPtr(y.(*descriptor)) }) 88 } 89 90 func init() { 91 state.Register((*descriptorBucketSliceAtomicPtr)(nil)) 92 state.Register((*descriptorBucketAtomicPtr)(nil)) 93 state.Register((*descriptorAtomicPtr)(nil)) 94 }