// automatically generated by stateify.

package futex

import (
	"gvisor.dev/gvisor/pkg/state"
)

func (p *AtomicPtrBucket) StateTypeName() string {
	return "pkg/sentry/kernel/futex.AtomicPtrBucket"
}

func (p *AtomicPtrBucket) StateFields() []string {
	return []string{
		"ptr",
	}
}

func (p *AtomicPtrBucket) beforeSave() {}

// +checklocksignore
func (p *AtomicPtrBucket) StateSave(stateSinkObject state.Sink) {
	p.beforeSave()
	var ptrValue *bucket
	ptrValue = p.savePtr()
	stateSinkObject.SaveValue(0, ptrValue)
}

func (p *AtomicPtrBucket) afterLoad() {}

// +checklocksignore
func (p *AtomicPtrBucket) StateLoad(stateSourceObject state.Source) {
	stateSourceObject.LoadValue(0, new(*bucket), func(y any) { p.loadPtr(y.(*bucket)) })
}

func init() {
	state.Register((*AtomicPtrBucket)(nil))
}
