// automatically generated by stateify.

package bitmap

import (
	"context"

	"gvisor.dev/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(context.Context) {}

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

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