func (fo *frameOpen) init(f *frame) { fo.frame = f fo.reads = sl.New(f.v.rng) fo.learntFutureReads = []*localAction{} fo.writes = sl.New(f.v.rng) fo.clientWrites = make(map[[common.ClientLen]byte]server.EmptyStruct) }
func NewResolver(rng *rand.Rand, hashCodes []common.RMId) *Resolver { indices := make([]uint8, len(hashCodes)) for idx := range indices { indices[idx] = uint8(idx) } res := &Resolver{ hashCodes: make([]common.RMId, len(hashCodes)), removed: sl.New(rng), straightIndices: indices, } copy(res.hashCodes, hashCodes) for idx, hc := range hashCodes { if hc == common.RMIdEmpty { res.removed.Insert(intKey(idx), true) } } return res }
func newStore() *store { return &store{traces: skiplist.New(rand.New(rand.NewSource(0)))} }