github.com/ttpreport/gvisor-ligolo@v0.0.0-20240123134145-a858404967ba/pkg/sentry/kernel/futex/futex_unsafe_state_autogen.go (about) 1 // automatically generated by stateify. 2 3 package futex 4 5 import ( 6 "github.com/ttpreport/gvisor-ligolo/pkg/state" 7 ) 8 9 func (p *AtomicPtrBucket) StateTypeName() string { 10 return "pkg/sentry/kernel/futex.AtomicPtrBucket" 11 } 12 13 func (p *AtomicPtrBucket) StateFields() []string { 14 return []string{ 15 "ptr", 16 } 17 } 18 19 func (p *AtomicPtrBucket) beforeSave() {} 20 21 // +checklocksignore 22 func (p *AtomicPtrBucket) StateSave(stateSinkObject state.Sink) { 23 p.beforeSave() 24 var ptrValue *bucket 25 ptrValue = p.savePtr() 26 stateSinkObject.SaveValue(0, ptrValue) 27 } 28 29 func (p *AtomicPtrBucket) afterLoad() {} 30 31 // +checklocksignore 32 func (p *AtomicPtrBucket) StateLoad(stateSourceObject state.Source) { 33 stateSourceObject.LoadValue(0, new(*bucket), func(y any) { p.loadPtr(y.(*bucket)) }) 34 } 35 36 func init() { 37 state.Register((*AtomicPtrBucket)(nil)) 38 }