// automatically generated by stateify.

package bitmap

import (
	"github.com/sagernet/gvisor/pkg/state"
)

func (b *Bitmap) StateTypeName() string {
	return "pkg/bitmap.Bitmap"
}

func (b *Bitmap) StateFields() []string {
	return []string{
		"numOnes",
		"bitBlock",
	}
}

func (b *Bitmap) beforeSave() {}

// +checklocksignore
func (b *Bitmap) StateSave(stateSinkObject state.Sink) {
	b.beforeSave()
	stateSinkObject.Save(0, &b.numOnes)
	stateSinkObject.Save(1, &b.bitBlock)
}

func (b *Bitmap) afterLoad() {}

// +checklocksignore
func (b *Bitmap) StateLoad(stateSourceObject state.Source) {
	stateSourceObject.Load(0, &b.numOnes)
	stateSourceObject.Load(1, &b.bitBlock)
}

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