Lines Matching refs:version
40 version: AtomicUsize,
56 version: Default::default(),
65 let version = self.version.load(Ordering::SeqCst) % VERSIONS;
66 let curr_count = &self.version_holder_count[version];
75 // 1. reader loads the current version
76 // 2. writer increments the version
78 // 4. writer blocking waits until old version counter is 0
79 // 5. reader increments the old version counter
80 // 6. reader acquires the old data using the old version
82 let data = self.data[version].load(Ordering::SeqCst);
102 let version = self.version.load(Ordering::SeqCst);
106 version,
111 pub(crate) fn wait_version_release(&self, version: usize) {
112 let count = &self.version_holder_count[version];
140 version: usize,
149 let old_version = self.version % VERSIONS;
152 self.lock.version.store(new_version, Ordering::SeqCst);
156 self.version = new_version;
170 let data = self.lock.data[self.version].load(Ordering::SeqCst);