github.com/nicocha30/gvisor-ligolo@v0.0.0-20230726075806-989fa2c0a413/pkg/sentry/inet/inet_unsafe_state_autogen.go (about)

     1  // automatically generated by stateify.
     2  
     3  package inet
     4  
     5  import (
     6  	"github.com/nicocha30/gvisor-ligolo/pkg/state"
     7  )
     8  
     9  func (p *NamespaceAtomicPtr) StateTypeName() string {
    10  	return "pkg/sentry/inet.NamespaceAtomicPtr"
    11  }
    12  
    13  func (p *NamespaceAtomicPtr) StateFields() []string {
    14  	return []string{
    15  		"ptr",
    16  	}
    17  }
    18  
    19  func (p *NamespaceAtomicPtr) beforeSave() {}
    20  
    21  // +checklocksignore
    22  func (p *NamespaceAtomicPtr) StateSave(stateSinkObject state.Sink) {
    23  	p.beforeSave()
    24  	var ptrValue *Namespace
    25  	ptrValue = p.savePtr()
    26  	stateSinkObject.SaveValue(0, ptrValue)
    27  }
    28  
    29  func (p *NamespaceAtomicPtr) afterLoad() {}
    30  
    31  // +checklocksignore
    32  func (p *NamespaceAtomicPtr) StateLoad(stateSourceObject state.Source) {
    33  	stateSourceObject.LoadValue(0, new(*Namespace), func(y any) { p.loadPtr(y.(*Namespace)) })
    34  }
    35  
    36  func init() {
    37  	state.Register((*NamespaceAtomicPtr)(nil))
    38  }