github.com/nicocha30/gvisor-ligolo@v0.0.0-20230726075806-989fa2c0a413/pkg/bitmap/bitmap_state_autogen.go (about)

     1  // automatically generated by stateify.
     2  
     3  package bitmap
     4  
     5  import (
     6  	"github.com/nicocha30/gvisor-ligolo/pkg/state"
     7  )
     8  
     9  func (b *Bitmap) StateTypeName() string {
    10  	return "pkg/bitmap.Bitmap"
    11  }
    12  
    13  func (b *Bitmap) StateFields() []string {
    14  	return []string{
    15  		"numOnes",
    16  		"bitBlock",
    17  	}
    18  }
    19  
    20  func (b *Bitmap) beforeSave() {}
    21  
    22  // +checklocksignore
    23  func (b *Bitmap) StateSave(stateSinkObject state.Sink) {
    24  	b.beforeSave()
    25  	stateSinkObject.Save(0, &b.numOnes)
    26  	stateSinkObject.Save(1, &b.bitBlock)
    27  }
    28  
    29  func (b *Bitmap) afterLoad() {}
    30  
    31  // +checklocksignore
    32  func (b *Bitmap) StateLoad(stateSourceObject state.Source) {
    33  	stateSourceObject.Load(0, &b.numOnes)
    34  	stateSourceObject.Load(1, &b.bitBlock)
    35  }
    36  
    37  func init() {
    38  	state.Register((*Bitmap)(nil))
    39  }