/external/rust/crates/num-traits/src/ops/ |
D | checked.rs | 8 fn checked_add(&self, v: &Self) -> Option<Self>; in checked_add() method 22 checked_impl!(CheckedAdd, checked_add, u8); 23 checked_impl!(CheckedAdd, checked_add, u16); 24 checked_impl!(CheckedAdd, checked_add, u32); 25 checked_impl!(CheckedAdd, checked_add, u64); 26 checked_impl!(CheckedAdd, checked_add, usize); 28 checked_impl!(CheckedAdd, checked_add, u128); 30 checked_impl!(CheckedAdd, checked_add, i8); 31 checked_impl!(CheckedAdd, checked_add, i16); 32 checked_impl!(CheckedAdd, checked_add, i32); [all …]
|
/external/crosvm/vm_memory/src/ |
D | guest_address.rs | 37 pub fn checked_add(self, other: u64) -> Option<GuestAddress> { in checked_add() method 38 self.0.checked_add(other).map(GuestAddress) in checked_add() 134 assert_eq!(Some(GuestAddress(0xb0)), a.checked_add(0x60)); in add_sub() 141 assert_eq!(Some(GuestAddress(0xffffffffffffff57)), a.checked_add(2)); in checked_add_overflow() 142 assert!(a.checked_add(0xf0).is_none()); in checked_add_overflow()
|
/external/crosvm/x86_64/src/ |
D | acpi.rs | 110 let mut offset = rsdp_offset.checked_add(RSDP::len() as u64)?; in create_acpi_tables() 122 offset = offset.checked_add(sdt.len() as u64)?; in create_acpi_tables() 132 offset = offset.checked_add(dsdt.len() as u64)?; in create_acpi_tables() 185 offset = offset.checked_add(facp.len() as u64)?; in create_acpi_tables() 221 offset = offset.checked_add(madt.len() as u64)?; in create_acpi_tables()
|
D | smbios.rs | 202 .checked_add(mem::size_of::<T>() as u64) in write_and_incr() 242 .checked_add(mem::size_of::<Smbios30Entrypoint>() as u64) in setup_smbios_from_file() 265 .checked_add(mem::size_of::<Smbios23Entrypoint>() as u64) in setup_smbios_from_file() 293 .checked_add(mem::size_of::<Smbios30Entrypoint>() as u64) in setup_smbios()
|
D | mptable.rs | 134 if let Some(end_mp) = base_mp.checked_add(mp_size as u64 - 1) { in setup_mptable() 473 let mpc_end = mpc_offset.checked_add(mpc_table.length as u64).unwrap(); in cpu_entry_count() 476 .checked_add(mem::size_of::<mpc_table>() as u64) in cpu_entry_count() 482 .checked_add(table_entry_size(entry_type) as u64) in cpu_entry_count()
|
/external/rust/crates/instant/tests/ |
D | wasm.rs | 34 assert!(now.checked_add(Duration::from_millis(1)).is_some()); in test_checked_add() 37 now.checked_add(Duration::new(u64::MAX, ONE_BILLION - 1)) in test_checked_add()
|
/external/rust/crates/async-task/src/ |
D | utils.rs | 48 let offset = a.size().checked_add(pad).unwrap(); in extend() 49 let new_size = offset.checked_add(b.size()).unwrap(); in extend()
|
/external/crosvm/resources/src/ |
D | address_allocator.rs | 47 .checked_add(pool_size - 1) in new() 93 0 => range.0.checked_add(size - 1), in allocate_with_align() 94 r => range.0.checked_add(size - 1 + alignment - r), in allocate_with_align() 137 let end = start.checked_add(size - 1).ok_or(Error::OutOfSpace)?; in allocate_at() 178 let mut slot = (start, start.checked_add(size - 1).ok_or(Error::OutOfSpace)?); in insert_at() 228 let address = start_addr.checked_add(offset).ok_or(Error::OutOfBounds)?; in address_from_pci_offset() 230 let end = address.checked_add(size).ok_or(Error::OutOfBounds)?; in address_from_pci_offset()
|
/external/rust/crates/vmm_vhost/src/vhost_user/ |
D | message.rs | 469 || self.guest_phys_addr.checked_add(self.memory_size).is_none() in is_valid() 470 || self.user_addr.checked_add(self.memory_size).is_none() in is_valid() 471 || self.mmap_offset.checked_add(self.memory_size).is_none() in is_valid() 515 || self.guest_phys_addr.checked_add(self.memory_size).is_none() in is_valid() 516 || self.user_addr.checked_add(self.memory_size).is_none() in is_valid() 517 || self.mmap_offset.checked_add(self.memory_size).is_none() in is_valid() 738 || self.fd_offset[i].checked_add(self.len[i]).is_none() in is_valid() 739 || self.cache_offset[i].checked_add(self.len[i]).is_none() in is_valid()
|
/external/rust/crates/parking_lot/src/ |
D | raw_rwlock.rs | 524 } else if let Some(new_state) = state.checked_add(ONE_READER) { in try_lock_shared_fast() 552 .checked_add(ONE_READER) in try_lock_shared_slow() 574 if let Some(new_state) = state.checked_add(ONE_READER | UPGRADABLE_BIT) { in try_lock_upgradable_fast() 595 .checked_add(ONE_READER | UPGRADABLE_BIT) in try_lock_upgradable_slow() 697 .checked_add(ONE_READER) in lock_shared_slow() 751 .checked_add(ONE_READER | UPGRADABLE_BIT) in lock_upgradable_slow() 801 (state - (ONE_READER | UPGRADABLE_BIT)).checked_add(new_state) in unlock_upgradable_slow()
|
D | util.rs | 38 Instant::now().checked_add(timeout) in to_deadline()
|
/external/rust/crates/vmm_vhost/src/vhost_kern/ |
D | mod.rs | 63 .checked_add(desc_table_size) in is_valid() 69 .checked_add(avail_ring_size) in is_valid() 75 .checked_add(used_ring_size) in is_valid()
|
/external/rust/crates/ring/src/ |
D | pbkdf2.rs | 178 idx = idx.checked_add(1).expect("derived key too long"); in derive() 247 idx = idx.checked_add(1).expect("derived key too long"); in verify()
|
/external/rust/crates/instant/src/ |
D | wasm.rs | 39 pub fn checked_add(&self, duration: Duration) -> Option<Instant> { in checked_add() method 40 self.0.checked_add(duration).map(Instant) in checked_add()
|
/external/rust/crates/tokio/src/time/ |
D | instant.rs | 149 pub fn checked_add(&self, duration: Duration) -> Option<Instant> { in checked_add() method 150 self.std.checked_add(duration).map(Instant::from_std) in checked_add()
|
/external/rust/crates/arbitrary/src/ |
D | unstructured.rs | 333 if let Some(range) = range.checked_add(T::Widest::ONE) { in int_in_range_impl() 616 fn checked_add(self, rhs: Self) -> Option<Self>; in checked_add() method 649 fn checked_add(self, rhs: Self) -> Option<Self> { 650 <$ty>::checked_add(self, rhs)
|
/external/crosvm/data_model/src/ |
D | volatile_memory.rs | 80 match base.checked_add(offset) { in calc_offset() 157 let new_addr = (self.as_mut_ptr() as usize).checked_add(count).ok_or( in offset() 181 let new_addr = (self.as_mut_ptr() as usize).checked_add(offset).ok_or( in sub_slice() 420 let new_addr = (self.mem.as_ptr() as usize).checked_add(offset).ok_or( in get_slice()
|
/external/rust/crates/itertools/src/ |
D | size_hint.rs | 16 (Some(x), Some(y)) => x.checked_add(y), in add() 28 hi = hi.and_then(|elt| elt.checked_add(x)); in add_scalar()
|
/external/crosvm/kernel_loader/src/ |
D | lib.rs | 131 .checked_add(phdr.p_paddr) in load_kernel() 139 .checked_add(phdr.p_memsz) in load_kernel() 164 .checked_add(len as u64 + 1) in load_cmdline()
|
/external/rust/crates/chrono/src/ |
D | oldtime.rs | 197 secs_part.checked_add(nanos_part as i64) in num_microseconds() 205 secs_part.checked_add(nanos_part as i64) in num_nanoseconds() 209 pub fn checked_add(&self, rhs: &Duration) -> Option<Duration> { in checked_add() method 210 let mut secs = try_opt!(self.secs.checked_add(rhs.secs)); in checked_add() 214 secs = try_opt!(secs.checked_add(1)); in checked_add() 577 Duration::milliseconds(i64::MAX - 1).checked_add(&Duration::microseconds(999)), in test_duration_checked_ops() 581 .checked_add(&Duration::microseconds(1000)) in test_duration_checked_ops()
|
/external/rust/crates/serde_json/src/lexical/ |
D | digit.rs | 14 value.checked_mul(10)?.checked_add(digit as u64) in add_digit()
|
/external/rust/crates/futures-util/src/stream/stream/ |
D | zip.rs | 125 (Some(x), None) => x.checked_add(queued1_len), in size_hint() 126 (None, Some(y)) => y.checked_add(queued2_len), in size_hint()
|
/external/crosvm/vhost/src/ |
D | lib.rs | 194 .checked_add(desc_table_size as u64) in is_valid() 199 .checked_add(avail_ring_size as u64) in is_valid() 204 .checked_add(used_ring_size as u64) in is_valid()
|
/external/rust/crates/serde_cbor/src/ |
D | read.rs | 319 match self.index.checked_add(n) { in end() 432 match self.index.checked_add(n) { in end() 442 match self.scratch_index.checked_add(n) { in scratch_end() 552 match self.index.checked_add(n) { in end()
|
/external/crosvm/rutabaga_gfx/src/ |
D | macros.rs | 34 checked_arithmetic!($x checked_add $y "+")
|