github.com/ttpreport/gvisor-ligolo@v0.0.0-20240123134145-a858404967ba/pkg/sentry/devices/nvproxy/nvproxy_state_autogen.go (about)

     1  // automatically generated by stateify.
     2  
     3  package nvproxy
     4  
     5  import (
     6  	"github.com/ttpreport/gvisor-ligolo/pkg/state"
     7  )
     8  
     9  func (dev *frontendDevice) StateTypeName() string {
    10  	return "pkg/sentry/devices/nvproxy.frontendDevice"
    11  }
    12  
    13  func (dev *frontendDevice) StateFields() []string {
    14  	return []string{
    15  		"nvp",
    16  		"minor",
    17  	}
    18  }
    19  
    20  func (dev *frontendDevice) beforeSave() {}
    21  
    22  // +checklocksignore
    23  func (dev *frontendDevice) StateSave(stateSinkObject state.Sink) {
    24  	dev.beforeSave()
    25  	stateSinkObject.Save(0, &dev.nvp)
    26  	stateSinkObject.Save(1, &dev.minor)
    27  }
    28  
    29  func (dev *frontendDevice) afterLoad() {}
    30  
    31  // +checklocksignore
    32  func (dev *frontendDevice) StateLoad(stateSourceObject state.Source) {
    33  	stateSourceObject.Load(0, &dev.nvp)
    34  	stateSourceObject.Load(1, &dev.minor)
    35  }
    36  
    37  func (n *nvproxy) StateTypeName() string {
    38  	return "pkg/sentry/devices/nvproxy.nvproxy"
    39  }
    40  
    41  func (n *nvproxy) StateFields() []string {
    42  	return []string{
    43  		"objsMu",
    44  		"objsLive",
    45  	}
    46  }
    47  
    48  func (n *nvproxy) beforeSave() {}
    49  
    50  // +checklocksignore
    51  func (n *nvproxy) StateSave(stateSinkObject state.Sink) {
    52  	n.beforeSave()
    53  	stateSinkObject.Save(0, &n.objsMu)
    54  	stateSinkObject.Save(1, &n.objsLive)
    55  }
    56  
    57  func (n *nvproxy) afterLoad() {}
    58  
    59  // +checklocksignore
    60  func (n *nvproxy) StateLoad(stateSourceObject state.Source) {
    61  	stateSourceObject.Load(0, &n.objsMu)
    62  	stateSourceObject.Load(1, &n.objsLive)
    63  }
    64  
    65  func (o *object) StateTypeName() string {
    66  	return "pkg/sentry/devices/nvproxy.object"
    67  }
    68  
    69  func (o *object) StateFields() []string {
    70  	return []string{
    71  		"impl",
    72  	}
    73  }
    74  
    75  func (o *object) beforeSave() {}
    76  
    77  // +checklocksignore
    78  func (o *object) StateSave(stateSinkObject state.Sink) {
    79  	o.beforeSave()
    80  	stateSinkObject.Save(0, &o.impl)
    81  }
    82  
    83  func (o *object) afterLoad() {}
    84  
    85  // +checklocksignore
    86  func (o *object) StateLoad(stateSourceObject state.Source) {
    87  	stateSourceObject.Load(0, &o.impl)
    88  }
    89  
    90  func (o *osDescMem) StateTypeName() string {
    91  	return "pkg/sentry/devices/nvproxy.osDescMem"
    92  }
    93  
    94  func (o *osDescMem) StateFields() []string {
    95  	return []string{
    96  		"object",
    97  		"pinnedRanges",
    98  	}
    99  }
   100  
   101  func (o *osDescMem) beforeSave() {}
   102  
   103  // +checklocksignore
   104  func (o *osDescMem) StateSave(stateSinkObject state.Sink) {
   105  	o.beforeSave()
   106  	stateSinkObject.Save(0, &o.object)
   107  	stateSinkObject.Save(1, &o.pinnedRanges)
   108  }
   109  
   110  func (o *osDescMem) afterLoad() {}
   111  
   112  // +checklocksignore
   113  func (o *osDescMem) StateLoad(stateSourceObject state.Source) {
   114  	stateSourceObject.Load(0, &o.object)
   115  	stateSourceObject.Load(1, &o.pinnedRanges)
   116  }
   117  
   118  func (dev *uvmDevice) StateTypeName() string {
   119  	return "pkg/sentry/devices/nvproxy.uvmDevice"
   120  }
   121  
   122  func (dev *uvmDevice) StateFields() []string {
   123  	return []string{
   124  		"nvp",
   125  	}
   126  }
   127  
   128  func (dev *uvmDevice) beforeSave() {}
   129  
   130  // +checklocksignore
   131  func (dev *uvmDevice) StateSave(stateSinkObject state.Sink) {
   132  	dev.beforeSave()
   133  	stateSinkObject.Save(0, &dev.nvp)
   134  }
   135  
   136  func (dev *uvmDevice) afterLoad() {}
   137  
   138  // +checklocksignore
   139  func (dev *uvmDevice) StateLoad(stateSourceObject state.Source) {
   140  	stateSourceObject.Load(0, &dev.nvp)
   141  }
   142  
   143  func init() {
   144  	state.Register((*frontendDevice)(nil))
   145  	state.Register((*nvproxy)(nil))
   146  	state.Register((*object)(nil))
   147  	state.Register((*osDescMem)(nil))
   148  	state.Register((*uvmDevice)(nil))
   149  }