• Home
  • Raw
  • Download

Lines Matching full:tail

157     /// The tail of the queue.
158 tail: CachePadded<Position<T>>, field
186 tail: CachePadded::new(Position { in new()
194 /// Pushes back an element to the tail.
208 let mut tail = self.tail.index.load(Ordering::Acquire); in push() localVariable
209 let mut block = self.tail.block.load(Ordering::Acquire); in push()
214 let offset = (tail >> SHIFT) % LAP; in push()
219 tail = self.tail.index.load(Ordering::Acquire); in push()
220 block = self.tail.block.load(Ordering::Acquire); in push()
235 .tail in push()
244 tail = self.tail.index.load(Ordering::Acquire); in push()
245 block = self.tail.block.load(Ordering::Acquire); in push()
250 let new_tail = tail + (1 << SHIFT); in push()
252 // Try advancing the tail forward. in push()
253 match self.tail.index.compare_exchange_weak( in push()
254 tail, in push()
265 self.tail.block.store(next_block, Ordering::Release); in push()
266 self.tail.index.store(next_index, Ordering::Release); in push()
278 tail = t; in push()
279 block = self.tail.block.load(Ordering::Acquire); in push()
324 let tail = self.tail.index.load(Ordering::Relaxed); in pop() localVariable
326 // If the tail equals the head, that means the queue is empty. in pop()
327 if head >> SHIFT == tail >> SHIFT { in pop()
331 // If head and tail are not in the same block, set `HAS_NEXT` in head. in pop()
332 if (head >> SHIFT) / LAP != (tail >> SHIFT) / LAP { in pop()
405 let tail = self.tail.index.load(Ordering::SeqCst); in is_empty() localVariable
406 head >> SHIFT == tail >> SHIFT in is_empty()
427 // Load the tail index, then load the head index. in len()
428 let mut tail = self.tail.index.load(Ordering::SeqCst); in len() localVariable
431 // If the tail index didn't change, we've got consistent indices to work with. in len()
432 if self.tail.index.load(Ordering::SeqCst) == tail { in len()
434 tail &= !((1 << SHIFT) - 1); in len()
438 if (tail >> SHIFT) & (LAP - 1) == LAP - 1 { in len()
439 tail = tail.wrapping_add(1 << SHIFT); in len()
447 tail = tail.wrapping_sub((lap * LAP) << SHIFT); in len()
451 tail >>= SHIFT; in len()
454 // Return the difference minus the number of blocks between tail and head. in len()
455 return tail - head - tail / LAP; in len()
464 let mut tail = *self.tail.index.get_mut(); in drop() localVariable
469 tail &= !((1 << SHIFT) - 1); in drop()
472 // Drop all values between `head` and `tail` and deallocate the heap-allocated blocks. in drop()
473 while head != tail { in drop()
531 let tail = *value.tail.index.get_mut(); in next() localVariable
532 if head >> SHIFT == tail >> SHIFT { in next()