Home
last modified time | relevance | path

Searched refs:unlikely (Results 1 – 25 of 57) sorted by relevance

123

/DragonOS/kernel/src/debug/
H A Dbug.h14 if (unlikely(__ret_bug_on)) \
16 unlikely(__ret_bug_on); \
25 if (unlikely(__ret_warn_on)) \
27 unlikely(__ret_warn_on); \
38 if (unlikely(__ret_warn_once && !__warned)) \
43 unlikely(__ret_warn_once); \
48 if (unlikely(__ret_warn_on)) \
50 unlikely(__ret_warn_on); \
/DragonOS/kernel/src/arch/x86_64/mm/
H A Dfault.rs2 intrinsics::{likely, unlikely},
40 if unlikely(error_code.contains(X86PfErrorCode::X86_PF_SGX)) { in vma_access_error()
54 if unlikely(!vm_flags.contains(VmFlags::VM_WRITE)) { in vma_access_error()
60 if unlikely(error_code.contains(X86PfErrorCode::X86_PF_PROT)) { in vma_access_error()
64 if unlikely(!vma.is_accessible()) { in vma_access_error()
194 if unlikely( in do_user_addr_fault()
202 if unlikely(error_code.contains(X86PfErrorCode::X86_PF_RSVD)) { in do_user_addr_fault()
284 if unlikely(Self::vma_access_error(vma.clone(), error_code)) { in do_user_addr_fault()
300 if unlikely(fault.contains(VmFaultReason::VM_FAULT_RETRY)) { in do_user_addr_fault()
/DragonOS/kernel/src/time/
H A Dtimekeep.rs3 use core::intrinsics::unlikely;
50 if unlikely(secs >= KTIME_SEC_MAX) { in ktime_set()
H A Dtimekeeping.rs2 use core::intrinsics::{likely, unlikely};
227 if unlikely( in timekeeping_adjust()
426 if unlikely((tk.xtime_nsec as i64) < 0) { in update_wall_time()
437 if unlikely(tk.xtime.tv_nsec >= NSEC_PER_SEC.into()) { in update_wall_time()
/DragonOS/kernel/crates/bitmap/src/
H A Dbitmap_core.rs1 use core::{intrinsics::unlikely, marker::PhantomData};
19 if unlikely(index >= n) { in get()
34 if unlikely(index >= n) { in set()
127 if unlikely(index >= n) { in next_index()
150 if unlikely(index >= n) { in next_false_index()
173 if unlikely(index >= n) { in prev_index()
259 if unlikely(index >= n) { in make_index()
/DragonOS/kernel/src/sched/
H A Dpelt.rs1 use core::intrinsics::unlikely;
121 if unlikely(n > LOAD_AVG_PERIOD) { in decay_load()
127 if unlikely(local_n >= LOAD_AVG_PERIOD) { in decay_load()
206 if unlikely(self.throttled_count > 0) { in cfs_rq_clock_pelt()
H A Dfair.rs2 use core::intrinsics::unlikely;
187 if unlikely(self.load.weight != LoadWeight::NICE_0_LOAD_SHIFT as u64) { in calculate_delta_fair()
207 if unlikely(self.load.weight != shares) { in update_cfs_group()
462 if unlikely(nr_running > SCHED_NR_LATENCY.load(Ordering::SeqCst)) { in sched_period()
495 if unlikely(!se.on_rq()) { in sched_slice()
568 if unlikely(curr.is_none()) { in update_current()
576 if unlikely(now <= curr.exec_start) { in update_current()
1082 let throttled = if unlikely(self.throttled_count > 0) { in update_idle_clock_pelt()
1537 if unlikely(!was_sched_idle && rq.sched_idle_rq()) { in dequeue()
1548 if unlikely(rq.nr_running == 1) { in yield_task()
[all …]
H A Dmod.rs11 intrinsics::{likely, unlikely},
200 if unlikely(w >= Self::WMULT_CONST as u64) { in update_inv_weight()
203 } else if unlikely(w == 0) { in update_inv_weight()
226 if unlikely(fact_hi != 0) { in calculate_delta()
605 return unlikely( in sched_idle_rq()
635 if unlikely(current.flags().contains(ProcessFlags::NEED_SCHEDULE)) { in resched_current()
/DragonOS/kernel/src/mm/
H A Dsyscall.rs1 use core::{intrinsics::unlikely, slice::from_raw_parts};
454 if unlikely(verify_area(start_vaddr, len).is_err()) { in munmap()
457 if unlikely(len == 0) { in munmap()
488 if unlikely(verify_area(start_vaddr, len).is_err()) { in mprotect()
491 if unlikely(len == 0) { in mprotect()
524 if unlikely(verify_area(start_vaddr, len).is_err()) { in madvise()
527 if unlikely(len == 0) { in madvise()
556 if unlikely(verify_area(start, len).is_err()) { in msync()
559 if unlikely(len == 0) { in msync()
H A Dc_adapter.rs3 use core::intrinsics::unlikely;
40 if unlikely(guard.contains_key(&vaddr)) { in do_kmalloc()
/DragonOS/kernel/src/common/
H A Derr.h6 #define IS_ERR_VALUE(x) unlikely((x) >= (uint64_t)-MAX_ERRNO)
H A Dcompiler.h6 #define unlikely(x) __builtin_expect(!!(x), 0) macro
/DragonOS/kernel/src/process/
H A Didle.rs2 intrinsics::unlikely,
37 let kstack = if unlikely(i == 0) { in init_idle()
/DragonOS/kernel/src/libs/lib_ui/
H A Dtextui_no_alloc.rs2 intrinsics::unlikely,
48 if unlikely(character == '\0') { in no_init_textui_putchar_window()
/DragonOS/kernel/src/arch/x86_64/driver/
H A Dtsc.rs9 intrinsics::unlikely,
59 if unlikely(Self::cpu_khz() != 0 || Self::tsc_khz() != 0) { in determine_cpu_tsc_frequency()
353 if unlikely(ref1 == 0 && ref2 == 0) { in calc_pmtimer_ref()
/DragonOS/kernel/src/mm/allocator/
H A Dpage_frame.rs2 intrinsics::unlikely,
80 if unlikely(self.current == self.end) { in next()
161 if unlikely(self.current == self.end) { in next()
H A Dkernel_allocator.rs12 intrinsics::unlikely,
41 if unlikely(virt_addr.is_null()) { in alloc_in_buddy()
/DragonOS/kernel/src/driver/firmware/efi/
H A Dmemmap.rs1 use core::{intrinsics::unlikely, mem::size_of};
79 if unlikely(self.inner.vaddr.unwrap_or(VirtAddr::new(0)).is_null()) { in next()
/DragonOS/kernel/src/filesystem/kernfs/
H A Dmod.rs1 use core::{cmp::min, fmt::Debug, intrinsics::unlikely};
226 if unlikely(name.len() > KernFS::MAX_NAMELEN) { in find()
229 if unlikely(self.inode_type != KernInodeType::Dir) { in find()
455 if unlikely(self.inode_type != KernInodeType::Dir) { in add_dir()
487 if unlikely(self.inode_type != KernInodeType::Dir) { in add_file()
563 if unlikely(self.inode_type != KernInodeType::Dir) { in remove()
/DragonOS/kernel/src/arch/x86_64/include/asm/
H A Dcmpxchg.h75 if (unlikely(is_success == false)) \
/DragonOS/kernel/src/filesystem/sysfs/
H A Dgroup.rs1 use core::intrinsics::unlikely;
190 if unlikely((mode.bits() & (!0o644)) != 0) { in group_create_files()
/DragonOS/kernel/crates/ida/src/
H A Dlib.rs11 use core::intrinsics::unlikely;
82 if unlikely(self.available() == 0) { in alloc()
/DragonOS/kernel/src/arch/x86_64/process/
H A Dmod.rs3 intrinsics::unlikely,
155 if unlikely(self.fp_state.is_none()) { in restore_fp_state()
169 if unlikely(self.fp_state.is_none()) { in clear_fp_state()
277 if unlikely((unsafe { *p }).is_null()) { in arch_current_pcb()
/DragonOS/kernel/src/exception/
H A Dhandle.rs1 use core::{intrinsics::unlikely, ops::BitAnd};
126 if unlikely(desc_inner_guard.actions().is_empty()) { in handle()
283 if unlikely(action_inner.thread_fn().is_none()) { in do_handle_irq_event()
/DragonOS/kernel/src/arch/riscv64/process/
H A Dmod.rs4 intrinsics::unlikely,
205 if unlikely(prev_regs.status.sd()) { in switch_process_fpu()
328 if core::intrinsics::unlikely((unsafe { *p }).is_null()) { in arch_current_pcb()

123