github.com/MerlinKodo/gvisor@v0.0.0-20231110090155-957f62ecf90e/pkg/tcpip/internal/tcp/tcp_state_autogen.go (about) 1 // automatically generated by stateify. 2 3 package tcp 4 5 import ( 6 "github.com/MerlinKodo/gvisor/pkg/state" 7 ) 8 9 func (offset *TSOffset) StateTypeName() string { 10 return "pkg/tcpip/internal/tcp.TSOffset" 11 } 12 13 func (offset *TSOffset) StateFields() []string { 14 return []string{ 15 "milliseconds", 16 } 17 } 18 19 func (offset *TSOffset) beforeSave() {} 20 21 // +checklocksignore 22 func (offset *TSOffset) StateSave(stateSinkObject state.Sink) { 23 offset.beforeSave() 24 stateSinkObject.Save(0, &offset.milliseconds) 25 } 26 27 func (offset *TSOffset) afterLoad() {} 28 29 // +checklocksignore 30 func (offset *TSOffset) StateLoad(stateSourceObject state.Source) { 31 stateSourceObject.Load(0, &offset.milliseconds) 32 } 33 34 func init() { 35 state.Register((*TSOffset)(nil)) 36 }