github.com/MerlinKodo/gvisor@v0.0.0-20231110090155-957f62ecf90e/pkg/sentry/fsimpl/timerfd/timerfd_state_autogen.go (about)

     1  // automatically generated by stateify.
     2  
     3  package timerfd
     4  
     5  import (
     6  	"github.com/MerlinKodo/gvisor/pkg/state"
     7  )
     8  
     9  func (tfd *TimerFileDescription) StateTypeName() string {
    10  	return "pkg/sentry/fsimpl/timerfd.TimerFileDescription"
    11  }
    12  
    13  func (tfd *TimerFileDescription) StateFields() []string {
    14  	return []string{
    15  		"vfsfd",
    16  		"FileDescriptionDefaultImpl",
    17  		"DentryMetadataFileDescriptionImpl",
    18  		"NoLockFD",
    19  		"events",
    20  		"timer",
    21  		"val",
    22  	}
    23  }
    24  
    25  func (tfd *TimerFileDescription) beforeSave() {}
    26  
    27  // +checklocksignore
    28  func (tfd *TimerFileDescription) StateSave(stateSinkObject state.Sink) {
    29  	tfd.beforeSave()
    30  	stateSinkObject.Save(0, &tfd.vfsfd)
    31  	stateSinkObject.Save(1, &tfd.FileDescriptionDefaultImpl)
    32  	stateSinkObject.Save(2, &tfd.DentryMetadataFileDescriptionImpl)
    33  	stateSinkObject.Save(3, &tfd.NoLockFD)
    34  	stateSinkObject.Save(4, &tfd.events)
    35  	stateSinkObject.Save(5, &tfd.timer)
    36  	stateSinkObject.Save(6, &tfd.val)
    37  }
    38  
    39  func (tfd *TimerFileDescription) afterLoad() {}
    40  
    41  // +checklocksignore
    42  func (tfd *TimerFileDescription) StateLoad(stateSourceObject state.Source) {
    43  	stateSourceObject.Load(0, &tfd.vfsfd)
    44  	stateSourceObject.Load(1, &tfd.FileDescriptionDefaultImpl)
    45  	stateSourceObject.Load(2, &tfd.DentryMetadataFileDescriptionImpl)
    46  	stateSourceObject.Load(3, &tfd.NoLockFD)
    47  	stateSourceObject.Load(4, &tfd.events)
    48  	stateSourceObject.Load(5, &tfd.timer)
    49  	stateSourceObject.Load(6, &tfd.val)
    50  }
    51  
    52  func init() {
    53  	state.Register((*TimerFileDescription)(nil))
    54  }