/DragonOS/kernel/src/arch/x86_64/mm/ |
H A D | fault.rs | 36 if error_code.contains(X86PfErrorCode::X86_PF_PK) { in vma_access_error() 40 if unlikely(error_code.contains(X86PfErrorCode::X86_PF_SGX)) { in vma_access_error() 46 error_code.contains(X86PfErrorCode::X86_PF_WRITE), in vma_access_error() 47 error_code.contains(X86PfErrorCode::X86_PF_INSTR), in vma_access_error() 53 if error_code.contains(X86PfErrorCode::X86_PF_WRITE) { 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() 82 && unsafe { x86::controlregs::cr4().contains(Cr4::CR4_ENABLE_SMEP) } in show_fault_oops() 102 if error_code.contains(X86PfErrorCode::X86_PF_USER) { in show_fault_oops() 107 if error_code.contains(X86PfErrorCode::X86_PF_INSTR) { in show_fault_oops() [all …]
|
/DragonOS/kernel/src/driver/tty/tty_ldisc/ |
H A D | ntty.rs | 189 if termios.input_mode.contains(InputMode::PARMRK) { in receive_buf_common() 225 if tty.core().flags().contains(TtyFlag::LDISC_CHANGING) { in receive_buf_common() 243 let preops = termios.input_mode.contains(InputMode::ISTRIP) in receive_buf() 244 || termios.input_mode.contains(InputMode::IUCLC) in receive_buf() 245 || termios.local_mode.contains(LocalMode::IEXTEN); in receive_buf() 250 } else if self.raw || (termios.local_mode.contains(LocalMode::EXTPROC) && !preops) { in receive_buf() 252 } else if tty.core().is_closing() && !termios.local_mode.contains(LocalMode::EXTPROC) { in receive_buf() 271 if self.icanon && !termios.local_mode.contains(LocalMode::EXTPROC) { in receive_buf() 326 if !termios.local_mode.contains(LocalMode::ECHO) in flush_echoes() 327 && !termios.local_mode.contains(LocalMode::ECHONL) in flush_echoes() [all …]
|
/DragonOS/kernel/src/process/ |
H A D | fork.rs | 212 if clone_flags.contains(CloneFlags::CLONE_VM) { in copy_flags() 247 if clone_flags.contains(CloneFlags::CLONE_VM) { in copy_mm() 267 if !clone_flags.contains(CloneFlags::CLONE_NEWNS) in copy_namespaces() 268 && !clone_flags.contains(CloneFlags::CLONE_NEWUTS) in copy_namespaces() 269 && !clone_flags.contains(CloneFlags::CLONE_NEWIPC) in copy_namespaces() 270 && !clone_flags.contains(CloneFlags::CLONE_NEWPID) in copy_namespaces() 271 && !clone_flags.contains(CloneFlags::CLONE_NEWNET) in copy_namespaces() 272 && !clone_flags.contains(CloneFlags::CLONE_NEWCGROUP) in copy_namespaces() 278 if clone_flags.contains(CloneFlags::CLONE_NEWIPC) in copy_namespaces() 279 && clone_flags.contains(CloneFlags::CLONE_SYSVSEM) in copy_namespaces() [all …]
|
H A D | exit.rs | 123 if !kwo.options.contains(WaitOption::WNOHANG) { in do_wait() 188 if kwo.options.contains(WaitOption::WNOHANG) in do_waitpid() 189 || kwo.options.contains(WaitOption::WNOWAIT) in do_waitpid() 210 if (!ptrace) && (!kwo.options.contains(WaitOption::WUNTRACED)) { in do_waitpid() 215 if likely(!(kwo.options.contains(WaitOption::WNOWAIT))) { in do_waitpid() 232 if likely(!kwo.options.contains(WaitOption::WEXITED)) { in do_waitpid()
|
/DragonOS/kernel/src/exception/ |
H A D | irqdata.rs | 431 self.contains(Self::IRQ_LEVEL) in is_level_type() 445 return Some(self.contains(Self::IRQ_TYPE_LEVEL_HIGH)); in is_level_high() 450 self.contains(Self::IRQ_PER_CPU_DEVID) in is_per_cpu_devid() 520 self.contains(Self::IRQD_SETAFFINITY_PENDING) in is_set_affinity_pending() 524 self.contains(Self::IRQD_PER_CPU) in is_per_cpu() 532 self.contains(Self::IRQD_AFFINITY_SET) in affinity_was_set() 536 self.contains(Self::IRQD_IRQ_MASKED) in masked() 540 self.contains(Self::IRQD_IRQ_DISABLED) in disabled() 548 self.contains(Self::IRQD_DEFAULT_TRIGGER_SET) in trigger_type_was_set() 569 self.contains(Self::IRQD_LEVEL) in is_level_type() [all …]
|
H A D | manage.rs | 127 if ((flags.contains(IrqHandleFlags::IRQF_SHARED)) && dev_id.is_none()) in request_threaded_irq() 128 || ((flags.contains(IrqHandleFlags::IRQF_SHARED)) in request_threaded_irq() 129 && (flags.contains(IrqHandleFlags::IRQF_NO_AUTOEN))) in request_threaded_irq() 130 || (!(flags.contains(IrqHandleFlags::IRQF_SHARED)) in request_threaded_irq() 131 && (flags.contains(IrqHandleFlags::IRQF_COND_SUSPEND))) in request_threaded_irq() 132 || ((flags.contains(IrqHandleFlags::IRQF_NO_SUSPEND)) in request_threaded_irq() 133 && (flags.contains(IrqHandleFlags::IRQF_COND_SUSPEND))) in request_threaded_irq() 217 .contains(IrqHandleFlags::IRQF_PROBE_SHARED) in inner_setup_irq() 284 .contains(IrqChipFlags::IRQCHIP_ONESHOT_SAFE) in inner_setup_irq() 331 .contains(IrqDescState::IRQS_NMI) in inner_setup_irq() [all …]
|
H A D | resend.rs | 38 .contains(IrqDescState::IRQS_REPLAY) in irq_check_and_resend() 45 .contains(IrqDescState::IRQS_PENDING) in irq_check_and_resend()
|
H A D | handle.rs | 67 if !chip.flags().contains(IrqChipFlags::IRQCHIP_EOI_IF_HANDLED) { in handle() 136 .contains(IrqDescState::IRQS_PENDING) in handle() 151 .contains(IrqDescState::IRQS_PENDING) in handle() 221 if thread.flags().contains(ProcessFlags::EXITING) { in do_irq_wake_thread() 301 .contains(IrqDescState::IRQS_ONESHOT) in cond_unmask_eoi_irq() 324 } else if !chip.flags().contains(IrqChipFlags::IRQCHIP_EOI_THREADED) { in cond_unmask_eoi_irq()
|
/DragonOS/kernel/src/mm/ |
H A D | syscall.rs | 146 if map_flags.contains(MapFlags::MAP_GROWSDOWN) { in from() 150 if map_flags.contains(MapFlags::MAP_LOCKED) { in from() 154 if map_flags.contains(MapFlags::MAP_SYNC) { in from() 158 if map_flags.contains(MapFlags::MAP_SHARED) { in from() 170 if prot_flags.contains(ProtFlags::PROT_READ) { in from() 174 if prot_flags.contains(ProtFlags::PROT_WRITE) { in from() 178 if prot_flags.contains(ProtFlags::PROT_EXEC) { in from() 190 if shm_flags.contains(ShmFlags::SHM_RDONLY) { in from() 196 if shm_flags.contains(ShmFlags::SHM_EXEC) { in from() 200 if shm_flags.contains(ShmFlags::SHM_HUGETLB) { in from() [all …]
|
H A D | fault.rs | 134 flags.contains(FaultFlags::FAULT_FLAG_WRITE), in handle_mm_fault() 135 flags.contains(FaultFlags::FAULT_FLAG_INSTRUCTION), in handle_mm_fault() 136 flags.contains(FaultFlags::FAULT_FLAG_REMOTE), in handle_mm_fault() 144 if unlikely(vm_flags.contains(VmFlags::VM_HUGETLB)) { in handle_mm_fault() 274 if !pfm.flags().contains(FaultFlags::FAULT_FLAG_WRITE) { in do_fault() 280 .contains(VmFlags::VM_SHARED) in do_fault() 448 if vma.lock().vm_flags().contains(VmFlags::VM_SHARED) { in do_wp_page() 613 if page_guard.flags().contains(PageFlags::PG_UPTODATE) { in filemap_map_pages() 703 let page_to_map = if flags.contains(FaultFlags::FAULT_FLAG_WRITE) in finish_fault() 704 && !vma_guard.vm_flags().contains(VmFlags::VM_SHARED) in finish_fault()
|
/DragonOS/kernel/crates/rust-slabmalloc/src/ |
H A D | sc.rs | 146 debug_assert!(self.slabs.contains(page_ptr)); in move_to_empty() 148 !self.empty_slabs.contains(page_ptr), in move_to_empty() 156 debug_assert!(!self.slabs.contains(page_ptr)); in move_to_empty() 157 debug_assert!(self.empty_slabs.contains(page_ptr)); in move_to_empty() 164 debug_assert!(self.slabs.contains(page_ptr)); in move_partial_to_full() 165 debug_assert!(!self.full_slabs.contains(page_ptr)); in move_partial_to_full() 170 debug_assert!(!self.slabs.contains(page_ptr)); in move_partial_to_full() 171 debug_assert!(self.full_slabs.contains(page_ptr)); in move_partial_to_full() 178 debug_assert!(!self.slabs.contains(page_ptr)); in move_full_to_partial() 179 debug_assert!(self.full_slabs.contains(page_ptr)); in move_full_to_partial() [all …]
|
/DragonOS/kernel/src/filesystem/vfs/ |
H A D | open.rs | 78 if flag.contains(!(AtFlags::AT_SYMLINK_NOFOLLOW | AtFlags::AT_EMPTY_PATH)) { in do_fchownat() 82 let follow_symlink = flag.contains(!AtFlags::AT_SYMLINK_NOFOLLOW); in do_fchownat() 126 if gid != current_gid && !group_info.gids.contains(&Kgid::from(gid)) { in chown_common() 186 if how.o_flags.contains(FileMode::O_CREAT) in do_sys_openat2() 187 && !how.o_flags.contains(FileMode::O_DIRECTORY) in do_sys_openat2() 210 if how.o_flags.contains(FileMode::O_DIRECTORY) && file_type != FileType::Dir { in do_sys_openat2() 219 if how.o_flags.contains(FileMode::O_APPEND) { in do_sys_openat2() 224 if how.o_flags.contains(FileMode::O_TRUNC) in do_sys_openat2() 225 && (how.o_flags.contains(FileMode::O_RDWR) || how.o_flags.contains(FileMode::O_WRONLY)) in do_sys_openat2() 259 let inode = if flags.contains(UtimensFlags::AT_SYMLINK_NOFOLLOW) {
|
H A D | syscall.rs | 414 if !o_flags.contains(FileMode::O_CREAT) { in new() 418 if o_flags.contains(FileMode::O_PATH) { in new() 841 if !(AtFlags::AT_EMPTY_PATH | AtFlags::AT_SYMLINK_FOLLOW).contains(flags) { in do_linkat() 845 let symlink_times = if flags.contains(AtFlags::AT_SYMLINK_FOLLOW) { in do_linkat() 854 if flags.contains(AtFlags::AT_EMPTY_PATH) { in do_linkat() 951 if flags.contains(AtFlags::AT_REMOVEDIR) { in unlinkat() 1138 if flags.contains(FileMode::O_CLOEXEC) { in do_dup3() 1411 if mask.contains(PosixStatxMask::STATX_RESERVED) { in do_statx() 1432 if mask.contains(PosixStatxMask::STATX_MODE) || mask.contains(PosixStatxMask::STATX_TYPE) { in do_statx() 1435 if mask.contains(PosixStatxMask::STATX_NLINK) { in do_statx() [all …]
|
/DragonOS/kernel/src/ipc/ |
H A D | pipe.rs | 75 if mode.contains(FileMode::O_RDONLY) { in poll() 87 if mode.contains(FileMode::O_WRONLY) { in poll() 219 if mode.contains(FileMode::O_NONBLOCK) { in read_at() 283 if mode.contains(FileMode::O_RDWR) { in open() 286 if mode.contains(FileMode::O_RDONLY) { in open() 289 if mode.contains(FileMode::O_WRONLY) { in open() 317 if mode.contains(FileMode::O_WRONLY) { in close() 328 if mode.contains(FileMode::O_RDONLY) { in close() 375 if mode.contains(FileMode::O_NONBLOCK) { in write_at()
|
H A D | signal.rs | 41 .contains(Signal::SIGKILL.into()) in fatal_signal_pending() 126 if matches!(self, Signal::SIGKILL) || pcb.flags().contains(ProcessFlags::KTHREAD) { in send_signal() 222 if pcb.sig_info_irqsave().sig_block().contains((*self).into()) { in wants_signal() 227 if pcb.flags().contains(ProcessFlags::EXITING) { in wants_signal() 295 .contains(self.into_sigset()) in prepare_sianal()
|
H A D | syscall.rs | 79 if flags.contains(FileMode::O_CLOEXEC) { in pipe2() 263 if shmflg.contains(ShmFlags::SHM_HUGETLB) { in shmget() 277 if shmflg.contains(ShmFlags::IPC_CREAT | ShmFlags::IPC_EXCL) { in shmget() 285 if !shmflg.contains(ShmFlags::IPC_CREAT) { in shmget() 352 .contains(vaddr) in shmat() 427 .contains(vaddr) in shmdt()
|
/DragonOS/tools/debugging/logmonitor/src/ |
H A D | ui.rs | 111 log if log.contains("INFO") => info_style, in draw_footer() 112 log if log.contains("WARNING") => warning_style, in draw_footer() 113 log if log.contains("ERROR") => error_style, in draw_footer() 114 log if log.contains("CRITICAL") => critical_style, in draw_footer()
|
/DragonOS/kernel/src/filesystem/sysfs/ |
H A D | file.rs | 142 if sys_support.contains(SysFSOpsSupport::ATTR_SHOW) in add_file_with_mode() 143 && sys_support.contains(SysFSOpsSupport::ATTR_STORE) in add_file_with_mode() 146 } else if sys_support.contains(SysFSOpsSupport::ATTR_SHOW) { in add_file_with_mode() 148 } else if sys_support.contains(SysFSOpsSupport::ATTR_STORE) { in add_file_with_mode() 253 if bin_support.contains(SysFSOpsSupport::BATTR_READ) in add_bin_file_with_mode() 254 && bin_support.contains(SysFSOpsSupport::BATTR_WRITE) in add_bin_file_with_mode() 257 } else if bin_support.contains(SysFSOpsSupport::BATTR_READ) { in add_bin_file_with_mode() 259 } else if bin_support.contains(SysFSOpsSupport::BATTR_WRITE) { in add_bin_file_with_mode()
|
/DragonOS/kernel/src/driver/input/ps2_mouse/ |
H A D | ps_mouse_device.rs | 131 self.flags.contains(MouseFlags::LEFT_BUTTON) in left_button_down() 136 !self.flags.contains(MouseFlags::LEFT_BUTTON) in left_button_up() 141 self.flags.contains(MouseFlags::RIGHT_BUTTON) in right_button_down() 146 !self.flags.contains(MouseFlags::RIGHT_BUTTON) in right_button_up() 264 if !SAMPLE_RATE.contains(&hz) { in set_sample_rate() 295 if !flags.contains(MouseFlags::ALWAYS_ONE) { in process_packet() 302 if !flags.contains(MouseFlags::X_OVERFLOW) { in process_packet() 308 if !flags.contains(MouseFlags::Y_OVERFLOW) { in process_packet() 326 if flags.contains(MouseFlags::X_SIGN) { in get_x_movement() 334 if flags.contains(MouseFlags::Y_SIGN) { in get_y_movement()
|
/DragonOS/kernel/src/driver/firmware/efi/ |
H A D | tables.rs | 187 if self.att.contains(MemoryAttribute::WRITE_BACK) in is_memory() 188 || self.att.contains(MemoryAttribute::WRITE_THROUGH) in is_memory() 189 || self.att.contains(MemoryAttribute::WRITE_COMBINE) in is_memory() 214 if self.att.contains(MemoryAttribute::SPECIAL_PURPOSE) { in is_usable_memory() 220 return self.att.contains(MemoryAttribute::WRITE_BACK); in is_usable_memory()
|
/DragonOS/kernel/src/arch/x86_64/process/ |
H A D | idle.rs | 17 if pcb.flags().contains(ProcessFlags::NEED_SCHEDULE) { in arch_idle_func()
|
H A D | mod.rs | 177 if x86::controlregs::cr4().contains(Cr4::CR4_ENABLE_FSGSBASE) { in save_fsbase() 185 if x86::controlregs::cr4().contains(Cr4::CR4_ENABLE_FSGSBASE) { in save_gsbase() 193 if x86::controlregs::cr4().contains(Cr4::CR4_ENABLE_FSGSBASE) { in restore_fsbase() 201 if x86::controlregs::cr4().contains(Cr4::CR4_ENABLE_FSGSBASE) { in restore_gsbase() 346 if new_pcb.flags().contains(ProcessFlags::KTHREAD) { in copy_thread() 354 if clone_flags.contains(CloneFlags::CLONE_SETTLS) { in copy_thread()
|
/DragonOS/kernel/src/sched/ |
H A D | mod.rs | 400 if !flags.contains(EnqueueFlag::ENQUEUE_NOCLOCK) { in enqueue_task() 404 if !flags.contains(EnqueueFlag::ENQUEUE_RESTORE) { in enqueue_task() 424 if !flags.contains(DequeueFlag::DEQUEUE_NOCLOCK) { in dequeue_task() 428 if !flags.contains(DequeueFlag::DEQUEUE_SAVE) { in dequeue_task() 456 if flags.contains(EnqueueFlag::ENQUEUE_MIGRATED) { in activate_task() 483 && self.current().flags().contains(ProcessFlags::NEED_SCHEDULE) in check_preempt_currnet() 492 *pcb.sched_info().on_rq.lock_irqsave() = if flags.contains(DequeueFlag::DEQUEUE_SLEEP) { in deactivate_task() 511 .contains(ClockUpdataFlag::RQCF_ACT_SKIP) in update_rq_clock() 635 if unlikely(current.flags().contains(ProcessFlags::NEED_SCHEDULE)) { in resched_current() 873 if !sched_mod.contains(SchedMode::SM_MASK_PREEMPT) in __schedule()
|
/DragonOS/kernel/src/filesystem/ |
H A D | eventfd.rs | 122 if lock_efd.flags.contains(EventFdFlags::EFD_NONBLOCK) { in read_at() 138 if eventfd.flags.contains(EventFdFlags::EFD_SEMAPHORE) { in read_at() 184 if eventfd.flags.contains(EventFdFlags::EFD_NONBLOCK) { in write_at() 270 let filemode = if flags.contains(EventFdFlags::EFD_CLOEXEC) { in sys_eventfd()
|
/DragonOS/kernel/src/time/ |
H A D | clocksource.rs | 440 .contains(ClocksourceFlags::CLOCK_SOURCE_MUST_VERIFY) in clocksource_enqueue_watchdog() 453 .contains(ClocksourceFlags::CLOCK_SOURCE_IS_CONTINUOUS) in clocksource_enqueue_watchdog() 540 .contains(ClocksourceFlags::CLOCK_SOURCE_MUST_VERIFY) in clocksource_dequeue_watchdog() 569 .contains(ClocksourceFlags::CLOCK_SOURCE_MUST_VERIFY) in clocksource_dequeue_watchdog() 816 .contains(ClocksourceFlags::CLOCK_SOURCE_UNSTABLE) in clocksource_watchdog() 845 .contains(ClocksourceFlags::CLOCK_SOURCE_WATCHDOG) in clocksource_watchdog() 887 .contains(ClocksourceFlags::CLOCK_SOURCE_VALID_FOR_HRES) in clocksource_watchdog() 890 .contains(ClocksourceFlags::CLOCK_SOURCE_IS_CONTINUOUS) in clocksource_watchdog() 893 .contains(ClocksourceFlags::CLOCK_SOURCE_IS_CONTINUOUS) in clocksource_watchdog() 924 if data.flags.contains(ClocksourceFlags::CLOCK_SOURCE_UNSTABLE) { in __clocksource_watchdog_kthread()
|