• Home
  • Raw
  • Download

Lines Matching full:generation

31 pub(crate) struct Generation<C = cfg::DefaultConfig> {  struct
46 struct LifecycleGen<C>(Generation<C>); argument
56 impl<C: cfg::Config> Pack<C> for Generation<C> { implementation
57 /// Use all the remaining bits in the word for the generation counter, minus
75 impl<C: cfg::Config> Generation<C> { impl
107 pub(crate) fn get(&self, gen: Generation<C>) -> Option<Guard<T, C>> { in get()
124 // Is it okay to access this slot? The accessed generation must be in get()
127 // generation, return `None`. in get()
151 // Since the new state may mean that the accessed generation in get()
167 fn mark_release(&self, gen: Generation<C>) -> Option<bool> { in mark_release()
181 // Is the slot still at the generation we are trying to remove? in mark_release()
234 fn release_with<F, M, R>(&self, gen: Generation<C>, offset: usize, free: &F, mutator: M) -> R in release_with()
254 // If we're going to remove the value, the generation has to match in release_with()
256 // already stored the new generation. in release_with()
270 // the next generation. in release_with()
278 // safety: we've modified the generation of this slot and any other thread in release_with()
279 // calling this method will exit out at the generation check above in the in release_with()
349 pub(crate) fn insert(&self, value: &mut Option<T>) -> Option<Generation<C>> { in insert()
354 let gen = guard.generation(); in insert()
377 gen: Generation<C>, in try_remove_value()
383 // generation. The bool inside this option indicates whether or not in try_remove_value()
386 // Otherwise, the generation we tried to remove has already expired, in try_remove_value()
390 "-> try_remove_value; nothing exists at generation={:?}", in try_remove_value()
411 gen: Generation<C>, in remove_value()
441 gen: Generation<C>, in try_clear_storage()
447 // generation. The bool inside this option indicates whether or not in try_clear_storage()
450 // Otherwise, the generation we tried to remove has already expired, in try_clear_storage()
454 "-> try_clear_storage; nothing exists at generation={:?}", in try_clear_storage()
477 gen: Generation<C>, in clear_storage()
551 // === impl Generation ===
553 impl<C> fmt::Debug for Generation<C> { implementation
555 f.debug_tuple("Generation").field(&self.value).finish() in fmt()
559 impl<C: cfg::Config> Generation<C> { impl
565 impl<C: cfg::Config> PartialEq for Generation<C> { implementation
571 impl<C: cfg::Config> Eq for Generation<C> {} implementation
573 impl<C: cfg::Config> PartialOrd for Generation<C> { implementation
579 impl<C: cfg::Config> Ord for Generation<C> { implementation
585 impl<C: cfg::Config> Clone for Generation<C> { implementation
591 impl<C: cfg::Config> Copy for Generation<C> {} implementation
688 const LEN: usize = cfg::WIDTH - (Lifecycle::<C>::LEN + Generation::<C>::LEN);
760 const LEN: usize = Generation::<C>::LEN;
764 Self(Generation::from_usize(value)) in from_usize()
773 pub(crate) fn generation(&self) -> Generation<C> { in generation() method
880 let new_lifecycle = LifecycleGen(self.generation()).pack(State::Removing as usize); in release2()