Lines Matching refs:ChipIdentifier
36 pub struct ChipIdentifier(pub u32); struct
40 impl fmt::Display for ChipIdentifier { implementation
46 impl fmt::Debug for ChipIdentifier { implementation
68 chips: RwLock<HashMap<ChipIdentifier, Arc<Chip>>>,
88 pub id: ChipIdentifier,
109 fn next_id(&self) -> ChipIdentifier { in next_id() argument
110 ChipIdentifier(self.ids.fetch_add(1, Ordering::SeqCst)) in next_id()
116 id: ChipIdentifier, in new() argument
176 pub fn get_chip(chip_id: &ChipIdentifier) -> Option<Arc<Chip>> { in get_chip()
181 pub fn remove_chip(chip_id: &ChipIdentifier) -> Option<Arc<Chip>> { in remove_chip()
185 pub fn next_id() -> ChipIdentifier { in next_id()
191 id: ChipIdentifier, in new() argument
203 id: ChipIdentifier, in new_chip() argument
214 fn get_chip(&self, chip_id: &ChipIdentifier) -> Option<Arc<Chip>> { in get_chip()
218 fn remove_chip(&self, chip_id: &ChipIdentifier) -> Option<Arc<Chip>> { in remove_chip()
232 const CHIP_ID: ChipIdentifier = ChipIdentifier(1000);
256 ChipIdentifier(0), in test_new_and_get_with_singleton()
285 ChipIdentifier(0), in test_chip_get_stats()
297 ChipIdentifier(0), in test_chip_get()
321 ChipIdentifier(0), in test_chip_patch()