Lines Matching full:tail
141 /// The tail of the queue.
142 tail: CachePadded<Position<T>>, field
167 tail: CachePadded::new(Position { in new()
189 let mut tail = self.tail.index.load(Ordering::Acquire); in push() localVariable
190 let mut block = self.tail.block.load(Ordering::Acquire); in push()
195 let offset = (tail >> SHIFT) % LAP; in push()
200 tail = self.tail.index.load(Ordering::Acquire); in push()
201 block = self.tail.block.load(Ordering::Acquire); in push()
216 .tail in push()
225 tail = self.tail.index.load(Ordering::Acquire); in push()
226 block = self.tail.block.load(Ordering::Acquire); in push()
231 let new_tail = tail + (1 << SHIFT); in push()
233 // Try advancing the tail forward. in push()
234 match self.tail.index.compare_exchange_weak( in push()
235 tail, in push()
246 self.tail.block.store(next_block, Ordering::Release); in push()
247 self.tail.index.store(next_index, Ordering::Release); in push()
259 tail = t; in push()
260 block = self.tail.block.load(Ordering::Acquire); in push()
303 let tail = self.tail.index.load(Ordering::Relaxed); in pop() localVariable
305 // If the tail equals the head, that means the queue is empty. in pop()
306 if head >> SHIFT == tail >> SHIFT { in pop()
310 // If head and tail are not in the same block, set `HAS_NEXT` in head. in pop()
311 if (head >> SHIFT) / LAP != (tail >> SHIFT) / LAP { in pop()
384 let tail = self.tail.index.load(Ordering::SeqCst); in is_empty() localVariable
385 head >> SHIFT == tail >> SHIFT in is_empty()
406 // Load the tail index, then load the head index. in len()
407 let mut tail = self.tail.index.load(Ordering::SeqCst); in len() localVariable
410 // If the tail index didn't change, we've got consistent indices to work with. in len()
411 if self.tail.index.load(Ordering::SeqCst) == tail { in len()
413 tail &= !((1 << SHIFT) - 1); in len()
417 if (tail >> SHIFT) & (LAP - 1) == LAP - 1 { in len()
418 tail = tail.wrapping_add(1 << SHIFT); in len()
426 tail = tail.wrapping_sub((lap * LAP) << SHIFT); in len()
430 tail >>= SHIFT; in len()
433 // Return the difference minus the number of blocks between tail and head. in len()
434 return tail - head - tail / LAP; in len()
443 let mut tail = *self.tail.index.get_mut(); in drop() localVariable
448 tail &= !((1 << SHIFT) - 1); in drop()
451 // Drop all values between `head` and `tail` and deallocate the heap-allocated blocks. in drop()
452 while head != tail { in drop()
511 let tail = *value.tail.index.get_mut(); in next() localVariable
512 if head >> SHIFT == tail >> SHIFT { in next()