// automatically generated by stateify.

package qdisc

import (
	"context"

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

func (pl *PacketBufferCircularList) StateTypeName() string {
	return "pkg/tcpip/link/qdisc.PacketBufferCircularList"
}

func (pl *PacketBufferCircularList) StateFields() []string {
	return []string{
		"pbs",
		"head",
		"size",
	}
}

func (pl *PacketBufferCircularList) beforeSave() {}

// +checklocksignore
func (pl *PacketBufferCircularList) StateSave(stateSinkObject state.Sink) {
	pl.beforeSave()
	stateSinkObject.Save(0, &pl.pbs)
	stateSinkObject.Save(1, &pl.head)
	stateSinkObject.Save(2, &pl.size)
}

func (pl *PacketBufferCircularList) afterLoad(context.Context) {}

// +checklocksignore
func (pl *PacketBufferCircularList) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &pl.pbs)
	stateSourceObject.Load(1, &pl.head)
	stateSourceObject.Load(2, &pl.size)
}

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