Home
last modified time | relevance | path

Searched refs:rhs (Results 1 – 9 of 9) sorted by relevance

/DragonOS/kernel/src/time/
H A Dmod.rs103 fn sub(self, rhs: Self) -> Self::Output { in sub()
104 let sec = self.tv_sec.checked_sub(rhs.tv_sec).unwrap_or(0); in sub()
105 let nsec = self.tv_nsec.checked_sub(rhs.tv_nsec).unwrap_or(0); in sub()
284 fn add(self, rhs: Duration) -> Instant { in add()
285 Instant::from_micros(self.micros + rhs.total_micros() as i64) in add()
290 fn add_assign(&mut self, rhs: Duration) { in add_assign()
291 self.micros += rhs.total_micros() as i64; in add_assign()
298 fn sub(self, rhs: Duration) -> Instant { in sub()
299 Instant::from_micros(self.micros - rhs.total_micros() as i64) in sub()
304 fn sub_assign(&mut self, rhs: Duration) { in sub_assign()
[all …]
/DragonOS/kernel/src/mm/allocator/
H A Dpage_frame.rs210 fn add(self, rhs: Self) -> Self::Output { in add()
211 return Self(self.0 + rhs.0); in add()
216 fn add_assign(&mut self, rhs: Self) { in add_assign()
217 self.0 += rhs.0; in add_assign()
224 fn sub(self, rhs: Self) -> Self::Output { in sub()
225 return Self(self.0 - rhs.0); in sub()
230 fn sub_assign(&mut self, rhs: Self) { in sub_assign()
231 self.0 -= rhs.0; in sub_assign()
238 fn mul(self, rhs: Self) -> Self::Output { in mul()
239 return Self(self.0 * rhs.0); in mul()
[all …]
/DragonOS/kernel/src/mm/
H A Dmod.rs205 fn add(self, rhs: usize) -> Self::Output { in add()
206 return Self(self.0 + rhs); in add()
212 fn add_assign(&mut self, rhs: usize) { in add_assign()
213 self.0 += rhs; in add_assign()
221 fn add(self, rhs: PhysAddr) -> Self::Output { in add()
222 return Self(self.0 + rhs.0); in add()
228 fn add_assign(&mut self, rhs: PhysAddr) { in add_assign()
229 self.0 += rhs.0; in add_assign()
235 fn bitor_assign(&mut self, rhs: usize) { in bitor_assign()
236 self.0 |= rhs; in bitor_assign()
[all …]
/DragonOS/kernel/crates/bitmap/src/
H A Dalloc_bitmap.rs24 pub fn bitand_assign(&mut self, rhs: &Self) { in bitand_assign()
25 for i in 0..rhs.data.len() { in bitand_assign()
26 self.data[i] &= rhs.data[i]; in bitand_assign()
123 fn bitand(self, rhs: Self) -> Self::Output { in bitand()
125 for i in 0..rhs.data.len() { in bitand()
126 result.data[i] = self.data[i] & rhs.data[i]; in bitand()
135 fn bitand(self, rhs: Self) -> Self::Output { in bitand()
136 &self & &rhs in bitand()
/DragonOS/kernel/src/exception/
H A Dmod.rs127 fn add(self, rhs: u32) -> HardwareIrqNumber { in add()
128 HardwareIrqNumber::new(self.0 + rhs) in add()
135 fn add(self, rhs: u32) -> IrqNumber { in add()
136 IrqNumber::new(self.0 + rhs) in add()
/DragonOS/kernel/crates/rbpf/src/
H A Dcranelift.rs402 let rhs = self.insn_src32(bcx, &insn); in translate_program() localVariable
403 let res = bcx.ins().iadd(lhs, rhs); in translate_program()
416 let rhs = self.insn_src32(bcx, &insn); in translate_program() localVariable
417 let res = bcx.ins().isub(lhs, rhs); in translate_program()
430 let rhs = self.insn_src32(bcx, &insn); in translate_program() localVariable
431 let res = bcx.ins().imul(lhs, rhs); in translate_program()
451 let rhs = self.insn_src32(bcx, &insn); in translate_program() localVariable
453 let rhs_is_zero = bcx.ins().icmp(IntCC::Equal, rhs, zero); in translate_program()
454 let safe_rhs = bcx.ins().select(rhs_is_zero, one, rhs); in translate_program()
470 let rhs = self.insn_src32(bcx, &insn); in translate_program() localVariable
[all …]
/DragonOS/kernel/src/libs/
H A Dcpumask.rs105 pub fn bitand_assign(&mut self, rhs: &CpuMask) { in bitand_assign()
106 self.bmp.bitand_assign(&rhs.bmp); in bitand_assign()
113 fn bitand(self, rhs: &CpuMask) -> Self::Output { in bitand()
114 let bmp = &self.bmp & &rhs.bmp; in bitand()
/DragonOS/kernel/src/libs/lib_ui/
H A Dtextui.rs150 fn add(self, rhs: i32) -> Self::Output { in add()
151 LineId::new(self.0 + rhs) in add()
157 fn sub(self, rhs: i32) -> Self::Output { in sub()
158 LineId::new(self.0 - rhs) in sub()
179 fn sub(mut self, rhs: LineId) -> Self::Output { in sub()
180 self.0 -= rhs.0; in sub()
185 fn add_assign(&mut self, rhs: LineId) { in add_assign()
186 self.0 += rhs.0; in add_assign()
202 fn add(self, rhs: LineIndex) -> Self::Output { in add()
203 LineIndex::new(self.0 + rhs.0) in add()
[all …]
/DragonOS/kernel/src/driver/base/block/
H A Dblock_device.rs59 pub fn intersects_with(&self, rhs: &Self) -> Option<Self> { in intersects_with()
61 if self.lba_start <= rhs.lba_end && self.lba_end >= rhs.lba_start { in intersects_with()
63 let start = usize::max(self.lba_start, rhs.lba_start); in intersects_with()
64 let end = usize::min(self.lba_end, rhs.lba_end); in intersects_with()