REQUIRES: External synchronization
| 233 | |
| 234 | // REQUIRES: External synchronization |
| 235 | void WriteStep(Random* rnd) { |
| 236 | const uint32_t k = rnd->Next() % K; |
| 237 | const intptr_t g = current_.Get(k) + 1; |
| 238 | const Key key = MakeKey(k, g); |
| 239 | list_.Insert(key); |
| 240 | current_.Set(k, g); |
| 241 | } |
| 242 | |
| 243 | void ReadStep(Random* rnd) { |
| 244 | // Remember the initial committed state of the skiplist. |