github.com/ttpreport/gvisor-ligolo@v0.0.0-20240123134145-a858404967ba/pkg/sentry/syscalls/linux/linux_state_autogen.go (about)

     1  // automatically generated by stateify.
     2  
     3  package linux
     4  
     5  import (
     6  	"github.com/ttpreport/gvisor-ligolo/pkg/state"
     7  )
     8  
     9  func (f *futexWaitRestartBlock) StateTypeName() string {
    10  	return "pkg/sentry/syscalls/linux.futexWaitRestartBlock"
    11  }
    12  
    13  func (f *futexWaitRestartBlock) StateFields() []string {
    14  	return []string{
    15  		"duration",
    16  		"addr",
    17  		"private",
    18  		"val",
    19  		"mask",
    20  	}
    21  }
    22  
    23  func (f *futexWaitRestartBlock) beforeSave() {}
    24  
    25  // +checklocksignore
    26  func (f *futexWaitRestartBlock) StateSave(stateSinkObject state.Sink) {
    27  	f.beforeSave()
    28  	stateSinkObject.Save(0, &f.duration)
    29  	stateSinkObject.Save(1, &f.addr)
    30  	stateSinkObject.Save(2, &f.private)
    31  	stateSinkObject.Save(3, &f.val)
    32  	stateSinkObject.Save(4, &f.mask)
    33  }
    34  
    35  func (f *futexWaitRestartBlock) afterLoad() {}
    36  
    37  // +checklocksignore
    38  func (f *futexWaitRestartBlock) StateLoad(stateSourceObject state.Source) {
    39  	stateSourceObject.Load(0, &f.duration)
    40  	stateSourceObject.Load(1, &f.addr)
    41  	stateSourceObject.Load(2, &f.private)
    42  	stateSourceObject.Load(3, &f.val)
    43  	stateSourceObject.Load(4, &f.mask)
    44  }
    45  
    46  func (p *pollRestartBlock) StateTypeName() string {
    47  	return "pkg/sentry/syscalls/linux.pollRestartBlock"
    48  }
    49  
    50  func (p *pollRestartBlock) StateFields() []string {
    51  	return []string{
    52  		"pfdAddr",
    53  		"nfds",
    54  		"timeout",
    55  	}
    56  }
    57  
    58  func (p *pollRestartBlock) beforeSave() {}
    59  
    60  // +checklocksignore
    61  func (p *pollRestartBlock) StateSave(stateSinkObject state.Sink) {
    62  	p.beforeSave()
    63  	stateSinkObject.Save(0, &p.pfdAddr)
    64  	stateSinkObject.Save(1, &p.nfds)
    65  	stateSinkObject.Save(2, &p.timeout)
    66  }
    67  
    68  func (p *pollRestartBlock) afterLoad() {}
    69  
    70  // +checklocksignore
    71  func (p *pollRestartBlock) StateLoad(stateSourceObject state.Source) {
    72  	stateSourceObject.Load(0, &p.pfdAddr)
    73  	stateSourceObject.Load(1, &p.nfds)
    74  	stateSourceObject.Load(2, &p.timeout)
    75  }
    76  
    77  func (n *clockNanosleepRestartBlock) StateTypeName() string {
    78  	return "pkg/sentry/syscalls/linux.clockNanosleepRestartBlock"
    79  }
    80  
    81  func (n *clockNanosleepRestartBlock) StateFields() []string {
    82  	return []string{
    83  		"c",
    84  		"end",
    85  		"rem",
    86  	}
    87  }
    88  
    89  func (n *clockNanosleepRestartBlock) beforeSave() {}
    90  
    91  // +checklocksignore
    92  func (n *clockNanosleepRestartBlock) StateSave(stateSinkObject state.Sink) {
    93  	n.beforeSave()
    94  	stateSinkObject.Save(0, &n.c)
    95  	stateSinkObject.Save(1, &n.end)
    96  	stateSinkObject.Save(2, &n.rem)
    97  }
    98  
    99  func (n *clockNanosleepRestartBlock) afterLoad() {}
   100  
   101  // +checklocksignore
   102  func (n *clockNanosleepRestartBlock) StateLoad(stateSourceObject state.Source) {
   103  	stateSourceObject.Load(0, &n.c)
   104  	stateSourceObject.Load(1, &n.end)
   105  	stateSourceObject.Load(2, &n.rem)
   106  }
   107  
   108  func init() {
   109  	state.Register((*futexWaitRestartBlock)(nil))
   110  	state.Register((*pollRestartBlock)(nil))
   111  	state.Register((*clockNanosleepRestartBlock)(nil))
   112  }