inet.af/netstack@v0.0.0-20220214151720-7585b01ddccf/atomicbitops/atomicbitops_64bit_state_autogen.go (about)

     1  // automatically generated by stateify.
     2  
     3  //go:build !arm && !mips && !mipsle && !386
     4  // +build !arm,!mips,!mipsle,!386
     5  
     6  package atomicbitops
     7  
     8  import (
     9  	"inet.af/netstack/state"
    10  )
    11  
    12  func (aa *AlignedAtomicInt64) StateTypeName() string {
    13  	return "pkg/atomicbitops.AlignedAtomicInt64"
    14  }
    15  
    16  func (aa *AlignedAtomicInt64) StateFields() []string {
    17  	return []string{
    18  		"value",
    19  	}
    20  }
    21  
    22  func (aa *AlignedAtomicInt64) beforeSave() {}
    23  
    24  // +checklocksignore
    25  func (aa *AlignedAtomicInt64) StateSave(stateSinkObject state.Sink) {
    26  	aa.beforeSave()
    27  	stateSinkObject.Save(0, &aa.value)
    28  }
    29  
    30  func (aa *AlignedAtomicInt64) afterLoad() {}
    31  
    32  // +checklocksignore
    33  func (aa *AlignedAtomicInt64) StateLoad(stateSourceObject state.Source) {
    34  	stateSourceObject.Load(0, &aa.value)
    35  }
    36  
    37  func (aa *AlignedAtomicUint64) StateTypeName() string {
    38  	return "pkg/atomicbitops.AlignedAtomicUint64"
    39  }
    40  
    41  func (aa *AlignedAtomicUint64) StateFields() []string {
    42  	return []string{
    43  		"value",
    44  	}
    45  }
    46  
    47  func (aa *AlignedAtomicUint64) beforeSave() {}
    48  
    49  // +checklocksignore
    50  func (aa *AlignedAtomicUint64) StateSave(stateSinkObject state.Sink) {
    51  	aa.beforeSave()
    52  	stateSinkObject.Save(0, &aa.value)
    53  }
    54  
    55  func (aa *AlignedAtomicUint64) afterLoad() {}
    56  
    57  // +checklocksignore
    58  func (aa *AlignedAtomicUint64) StateLoad(stateSourceObject state.Source) {
    59  	stateSourceObject.Load(0, &aa.value)
    60  }
    61  
    62  func init() {
    63  	state.Register((*AlignedAtomicInt64)(nil))
    64  	state.Register((*AlignedAtomicUint64)(nil))
    65  }