github.com/nicocha30/gvisor-ligolo@v0.0.0-20230726075806-989fa2c0a413/pkg/lisafs/lisafs_state_autogen.go (about)

     1  // automatically generated by stateify.
     2  
     3  package lisafs
     4  
     5  import (
     6  	"github.com/nicocha30/gvisor-ligolo/pkg/state"
     7  )
     8  
     9  func (r *boundSocketFDRefs) StateTypeName() string {
    10  	return "pkg/lisafs.boundSocketFDRefs"
    11  }
    12  
    13  func (r *boundSocketFDRefs) StateFields() []string {
    14  	return []string{
    15  		"refCount",
    16  	}
    17  }
    18  
    19  func (r *boundSocketFDRefs) beforeSave() {}
    20  
    21  // +checklocksignore
    22  func (r *boundSocketFDRefs) StateSave(stateSinkObject state.Sink) {
    23  	r.beforeSave()
    24  	stateSinkObject.Save(0, &r.refCount)
    25  }
    26  
    27  // +checklocksignore
    28  func (r *boundSocketFDRefs) StateLoad(stateSourceObject state.Source) {
    29  	stateSourceObject.Load(0, &r.refCount)
    30  	stateSourceObject.AfterLoad(r.afterLoad)
    31  }
    32  
    33  func (l *controlFDList) StateTypeName() string {
    34  	return "pkg/lisafs.controlFDList"
    35  }
    36  
    37  func (l *controlFDList) StateFields() []string {
    38  	return []string{
    39  		"head",
    40  		"tail",
    41  	}
    42  }
    43  
    44  func (l *controlFDList) beforeSave() {}
    45  
    46  // +checklocksignore
    47  func (l *controlFDList) StateSave(stateSinkObject state.Sink) {
    48  	l.beforeSave()
    49  	stateSinkObject.Save(0, &l.head)
    50  	stateSinkObject.Save(1, &l.tail)
    51  }
    52  
    53  func (l *controlFDList) afterLoad() {}
    54  
    55  // +checklocksignore
    56  func (l *controlFDList) StateLoad(stateSourceObject state.Source) {
    57  	stateSourceObject.Load(0, &l.head)
    58  	stateSourceObject.Load(1, &l.tail)
    59  }
    60  
    61  func (e *controlFDEntry) StateTypeName() string {
    62  	return "pkg/lisafs.controlFDEntry"
    63  }
    64  
    65  func (e *controlFDEntry) StateFields() []string {
    66  	return []string{
    67  		"next",
    68  		"prev",
    69  	}
    70  }
    71  
    72  func (e *controlFDEntry) beforeSave() {}
    73  
    74  // +checklocksignore
    75  func (e *controlFDEntry) StateSave(stateSinkObject state.Sink) {
    76  	e.beforeSave()
    77  	stateSinkObject.Save(0, &e.next)
    78  	stateSinkObject.Save(1, &e.prev)
    79  }
    80  
    81  func (e *controlFDEntry) afterLoad() {}
    82  
    83  // +checklocksignore
    84  func (e *controlFDEntry) StateLoad(stateSourceObject state.Source) {
    85  	stateSourceObject.Load(0, &e.next)
    86  	stateSourceObject.Load(1, &e.prev)
    87  }
    88  
    89  func (r *controlFDRefs) StateTypeName() string {
    90  	return "pkg/lisafs.controlFDRefs"
    91  }
    92  
    93  func (r *controlFDRefs) StateFields() []string {
    94  	return []string{
    95  		"refCount",
    96  	}
    97  }
    98  
    99  func (r *controlFDRefs) beforeSave() {}
   100  
   101  // +checklocksignore
   102  func (r *controlFDRefs) StateSave(stateSinkObject state.Sink) {
   103  	r.beforeSave()
   104  	stateSinkObject.Save(0, &r.refCount)
   105  }
   106  
   107  // +checklocksignore
   108  func (r *controlFDRefs) StateLoad(stateSourceObject state.Source) {
   109  	stateSourceObject.Load(0, &r.refCount)
   110  	stateSourceObject.AfterLoad(r.afterLoad)
   111  }
   112  
   113  func (r *nodeRefs) StateTypeName() string {
   114  	return "pkg/lisafs.nodeRefs"
   115  }
   116  
   117  func (r *nodeRefs) StateFields() []string {
   118  	return []string{
   119  		"refCount",
   120  	}
   121  }
   122  
   123  func (r *nodeRefs) beforeSave() {}
   124  
   125  // +checklocksignore
   126  func (r *nodeRefs) StateSave(stateSinkObject state.Sink) {
   127  	r.beforeSave()
   128  	stateSinkObject.Save(0, &r.refCount)
   129  }
   130  
   131  // +checklocksignore
   132  func (r *nodeRefs) StateLoad(stateSourceObject state.Source) {
   133  	stateSourceObject.Load(0, &r.refCount)
   134  	stateSourceObject.AfterLoad(r.afterLoad)
   135  }
   136  
   137  func (l *openFDList) StateTypeName() string {
   138  	return "pkg/lisafs.openFDList"
   139  }
   140  
   141  func (l *openFDList) StateFields() []string {
   142  	return []string{
   143  		"head",
   144  		"tail",
   145  	}
   146  }
   147  
   148  func (l *openFDList) beforeSave() {}
   149  
   150  // +checklocksignore
   151  func (l *openFDList) StateSave(stateSinkObject state.Sink) {
   152  	l.beforeSave()
   153  	stateSinkObject.Save(0, &l.head)
   154  	stateSinkObject.Save(1, &l.tail)
   155  }
   156  
   157  func (l *openFDList) afterLoad() {}
   158  
   159  // +checklocksignore
   160  func (l *openFDList) StateLoad(stateSourceObject state.Source) {
   161  	stateSourceObject.Load(0, &l.head)
   162  	stateSourceObject.Load(1, &l.tail)
   163  }
   164  
   165  func (e *openFDEntry) StateTypeName() string {
   166  	return "pkg/lisafs.openFDEntry"
   167  }
   168  
   169  func (e *openFDEntry) StateFields() []string {
   170  	return []string{
   171  		"next",
   172  		"prev",
   173  	}
   174  }
   175  
   176  func (e *openFDEntry) beforeSave() {}
   177  
   178  // +checklocksignore
   179  func (e *openFDEntry) StateSave(stateSinkObject state.Sink) {
   180  	e.beforeSave()
   181  	stateSinkObject.Save(0, &e.next)
   182  	stateSinkObject.Save(1, &e.prev)
   183  }
   184  
   185  func (e *openFDEntry) afterLoad() {}
   186  
   187  // +checklocksignore
   188  func (e *openFDEntry) StateLoad(stateSourceObject state.Source) {
   189  	stateSourceObject.Load(0, &e.next)
   190  	stateSourceObject.Load(1, &e.prev)
   191  }
   192  
   193  func (r *openFDRefs) StateTypeName() string {
   194  	return "pkg/lisafs.openFDRefs"
   195  }
   196  
   197  func (r *openFDRefs) StateFields() []string {
   198  	return []string{
   199  		"refCount",
   200  	}
   201  }
   202  
   203  func (r *openFDRefs) beforeSave() {}
   204  
   205  // +checklocksignore
   206  func (r *openFDRefs) StateSave(stateSinkObject state.Sink) {
   207  	r.beforeSave()
   208  	stateSinkObject.Save(0, &r.refCount)
   209  }
   210  
   211  // +checklocksignore
   212  func (r *openFDRefs) StateLoad(stateSourceObject state.Source) {
   213  	stateSourceObject.Load(0, &r.refCount)
   214  	stateSourceObject.AfterLoad(r.afterLoad)
   215  }
   216  
   217  func init() {
   218  	state.Register((*boundSocketFDRefs)(nil))
   219  	state.Register((*controlFDList)(nil))
   220  	state.Register((*controlFDEntry)(nil))
   221  	state.Register((*controlFDRefs)(nil))
   222  	state.Register((*nodeRefs)(nil))
   223  	state.Register((*openFDList)(nil))
   224  	state.Register((*openFDEntry)(nil))
   225  	state.Register((*openFDRefs)(nil))
   226  }