inet.af/netstack@v0.0.0-20220214151720-7585b01ddccf/atomicbitops/atomicbitops_32bit_unsafe_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  		"value32",
    20  	}
    21  }
    22  
    23  func (aa *AlignedAtomicInt64) beforeSave() {}
    24  
    25  // +checklocksignore
    26  func (aa *AlignedAtomicInt64) StateSave(stateSinkObject state.Sink) {
    27  	aa.beforeSave()
    28  	stateSinkObject.Save(0, &aa.value)
    29  	stateSinkObject.Save(1, &aa.value32)
    30  }
    31  
    32  func (aa *AlignedAtomicInt64) afterLoad() {}
    33  
    34  // +checklocksignore
    35  func (aa *AlignedAtomicInt64) StateLoad(stateSourceObject state.Source) {
    36  	stateSourceObject.Load(0, &aa.value)
    37  	stateSourceObject.Load(1, &aa.value32)
    38  }
    39  
    40  func (aa *AlignedAtomicUint64) StateTypeName() string {
    41  	return "pkg/atomicbitops.AlignedAtomicUint64"
    42  }
    43  
    44  func (aa *AlignedAtomicUint64) StateFields() []string {
    45  	return []string{
    46  		"value",
    47  		"value32",
    48  	}
    49  }
    50  
    51  func (aa *AlignedAtomicUint64) beforeSave() {}
    52  
    53  // +checklocksignore
    54  func (aa *AlignedAtomicUint64) StateSave(stateSinkObject state.Sink) {
    55  	aa.beforeSave()
    56  	stateSinkObject.Save(0, &aa.value)
    57  	stateSinkObject.Save(1, &aa.value32)
    58  }
    59  
    60  func (aa *AlignedAtomicUint64) afterLoad() {}
    61  
    62  // +checklocksignore
    63  func (aa *AlignedAtomicUint64) StateLoad(stateSourceObject state.Source) {
    64  	stateSourceObject.Load(0, &aa.value)
    65  	stateSourceObject.Load(1, &aa.value32)
    66  }
    67  
    68  func init() {
    69  	state.Register((*AlignedAtomicInt64)(nil))
    70  	state.Register((*AlignedAtomicUint64)(nil))
    71  }