github.com/MerlinKodo/gvisor@v0.0.0-20231110090155-957f62ecf90e/pkg/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  	"github.com/MerlinKodo/gvisor/pkg/state"
    10  )
    11  
    12  func (i *Int64) StateTypeName() string {
    13  	return "pkg/atomicbitops.Int64"
    14  }
    15  
    16  func (i *Int64) StateFields() []string {
    17  	return []string{
    18  		"value",
    19  		"value32",
    20  	}
    21  }
    22  
    23  func (i *Int64) beforeSave() {}
    24  
    25  // +checklocksignore
    26  func (i *Int64) StateSave(stateSinkObject state.Sink) {
    27  	i.beforeSave()
    28  	stateSinkObject.Save(0, &i.value)
    29  	stateSinkObject.Save(1, &i.value32)
    30  }
    31  
    32  func (i *Int64) afterLoad() {}
    33  
    34  // +checklocksignore
    35  func (i *Int64) StateLoad(stateSourceObject state.Source) {
    36  	stateSourceObject.Load(0, &i.value)
    37  	stateSourceObject.Load(1, &i.value32)
    38  }
    39  
    40  func (u *Uint64) StateTypeName() string {
    41  	return "pkg/atomicbitops.Uint64"
    42  }
    43  
    44  func (u *Uint64) StateFields() []string {
    45  	return []string{
    46  		"value",
    47  		"value32",
    48  	}
    49  }
    50  
    51  func (u *Uint64) beforeSave() {}
    52  
    53  // +checklocksignore
    54  func (u *Uint64) StateSave(stateSinkObject state.Sink) {
    55  	u.beforeSave()
    56  	stateSinkObject.Save(0, &u.value)
    57  	stateSinkObject.Save(1, &u.value32)
    58  }
    59  
    60  func (u *Uint64) afterLoad() {}
    61  
    62  // +checklocksignore
    63  func (u *Uint64) StateLoad(stateSourceObject state.Source) {
    64  	stateSourceObject.Load(0, &u.value)
    65  	stateSourceObject.Load(1, &u.value32)
    66  }
    67  
    68  func init() {
    69  	state.Register((*Int64)(nil))
    70  	state.Register((*Uint64)(nil))
    71  }