// automatically generated by stateify.

package signalfd

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

func (sfd *SignalFileDescription) StateTypeName() string {
	return "pkg/sentry/fsimpl/signalfd.SignalFileDescription"
}

func (sfd *SignalFileDescription) StateFields() []string {
	return []string{
		"vfsfd",
		"FileDescriptionDefaultImpl",
		"DentryMetadataFileDescriptionImpl",
		"NoLockFD",
		"NoAsyncEventFD",
		"target",
		"queue",
		"entry",
	}
}

func (sfd *SignalFileDescription) beforeSave() {}

// +checklocksignore
func (sfd *SignalFileDescription) StateSave(stateSinkObject state.Sink) {
	sfd.beforeSave()
	stateSinkObject.Save(0, &sfd.vfsfd)
	stateSinkObject.Save(1, &sfd.FileDescriptionDefaultImpl)
	stateSinkObject.Save(2, &sfd.DentryMetadataFileDescriptionImpl)
	stateSinkObject.Save(3, &sfd.NoLockFD)
	stateSinkObject.Save(4, &sfd.NoAsyncEventFD)
	stateSinkObject.Save(5, &sfd.target)
	stateSinkObject.Save(6, &sfd.queue)
	stateSinkObject.Save(7, &sfd.entry)
}

func (sfd *SignalFileDescription) afterLoad() {}

// +checklocksignore
func (sfd *SignalFileDescription) StateLoad(stateSourceObject state.Source) {
	stateSourceObject.Load(0, &sfd.vfsfd)
	stateSourceObject.Load(1, &sfd.FileDescriptionDefaultImpl)
	stateSourceObject.Load(2, &sfd.DentryMetadataFileDescriptionImpl)
	stateSourceObject.Load(3, &sfd.NoLockFD)
	stateSourceObject.Load(4, &sfd.NoAsyncEventFD)
	stateSourceObject.Load(5, &sfd.target)
	stateSourceObject.Load(6, &sfd.queue)
	stateSourceObject.Load(7, &sfd.entry)
}

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