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