// automatically generated by stateify.

package fasync

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

func (a *FileAsync) StateTypeName() string {
	return "pkg/sentry/kernel/fasync.FileAsync"
}

func (a *FileAsync) StateFields() []string {
	return []string{
		"e",
		"fd",
		"requester",
		"registered",
		"signal",
		"recipientPG",
		"recipientTG",
		"recipientT",
	}
}

func (a *FileAsync) beforeSave() {}

// +checklocksignore
func (a *FileAsync) StateSave(stateSinkObject state.Sink) {
	a.beforeSave()
	stateSinkObject.Save(0, &a.e)
	stateSinkObject.Save(1, &a.fd)
	stateSinkObject.Save(2, &a.requester)
	stateSinkObject.Save(3, &a.registered)
	stateSinkObject.Save(4, &a.signal)
	stateSinkObject.Save(5, &a.recipientPG)
	stateSinkObject.Save(6, &a.recipientTG)
	stateSinkObject.Save(7, &a.recipientT)
}

func (a *FileAsync) afterLoad() {}

// +checklocksignore
func (a *FileAsync) StateLoad(stateSourceObject state.Source) {
	stateSourceObject.Load(0, &a.e)
	stateSourceObject.Load(1, &a.fd)
	stateSourceObject.Load(2, &a.requester)
	stateSourceObject.Load(3, &a.registered)
	stateSourceObject.Load(4, &a.signal)
	stateSourceObject.Load(5, &a.recipientPG)
	stateSourceObject.Load(6, &a.recipientTG)
	stateSourceObject.Load(7, &a.recipientT)
}

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