Home
last modified time | relevance | path

Searched refs:flags (Results 1 – 25 of 104) sorted by relevance

12345

/DragonOS/kernel/src/libs/
H A Dprintk.c25 static char *write_num(char *str, ul num, int base, int field_width, int precision, int flags);
27 static char *write_float_point_num(char *str, double num, int field_width, int precision, int flags
64 int flags; // 用来存储格式信息的bitmap in __do_vsprintf() local
88 field_width = flags = 0; in __do_vsprintf()
106 flags |= LEFT; in __do_vsprintf()
111 flags |= PLUS; in __do_vsprintf()
115 flags |= SPACE; in __do_vsprintf()
120 flags |= SPECIAL; in __do_vsprintf()
125 flags |= PAD_ZERO; in __do_vsprintf()
149 flags |= LEFT; in __do_vsprintf()
[all …]
/DragonOS/kernel/src/exception/
H A Dmod.rs36 unsafe fn restore_irq(flags: IrqFlags); in restore_irq()
56 flags: usize, field
60 pub fn new(flags: usize) -> Self { in new()
61 IrqFlags { flags } in new()
64 pub fn flags(&self) -> usize { in flags() method
65 self.flags in flags()
87 flags: IrqFlags, field
98 pub unsafe fn new(flags: IrqFlags) -> Self { in new()
99 IrqFlagsGuard { flags } in new()
105 CurrentIrqArch::restore_irq(self.flags); in drop()
H A Dmanage.rs67 flags: IrqHandleFlags, in request_irq()
70 return self.request_threaded_irq(irq, Some(handler), None, flags, name, dev_id); in request_irq()
114 flags: IrqHandleFlags, in request_threaded_irq()
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()
[all …]
/DragonOS/kernel/src/libs/futex/
H A Dsyscall.rs30 let mut flags = FutexFlag::FLAGS_MATCH_NONE; in do_futex() localVariable
33 flags.insert(FutexFlag::FLAGS_SHARED); in do_futex()
37 flags.insert(FutexFlag::FLAGS_CLOCKRT); in do_futex()
48 return Futex::futex_wait(uaddr, flags, val, timeout, FUTEX_BITSET_MATCH_ANY); in do_futex()
51 return Futex::futex_wait(uaddr, flags, val, timeout, val3); in do_futex()
54 return Futex::futex_wake(uaddr, flags, val, FUTEX_BITSET_MATCH_ANY); in do_futex()
57 return Futex::futex_wake(uaddr, flags, val, val3); in do_futex()
62 flags, in do_futex()
73 flags, in do_futex()
84 flags, in do_futex()
/DragonOS/kernel/crates/intertrait/macros/src/
H A Dlib.rs68 Ok(Targets { flags, paths }) => { in cast_to()
70 item_impl::process(&flags, parse_macro_input!(input as ItemImpl)) in cast_to()
72 item_type::process(&flags, paths, parse_macro_input!(input as DeriveInput)) in cast_to()
137 targets: Targets { flags, paths }, in castable_to()
142 .map(|t| generate_caster(&ty, t, flags.contains(&Flag::Sync))) in castable_to()
H A Dargs.rs25 pub flags: HashSet<Flag>, field
31 let mut flags = HashSet::new(); in parse() localVariable
35 return Ok(Targets { flags, paths }); in parse()
42 if !flags.insert(Flag::from(&ident)?) { in parse()
50 return Ok(Targets { flags, paths }); in parse()
57 Ok(Targets { flags, paths }) in parse()
/DragonOS/kernel/src/bpf/map/
H A Dqueue.rs20 fn push(&mut self, value: BpfQueueValue, flags: BpfMapUpdateElemFlags) -> Result<()>; in push()
56 fn push(&mut self, value: BpfQueueValue, flags: BpfMapUpdateElemFlags) -> Result<()> { in push()
58 if flags.contains(BpfMapUpdateElemFlags::BPF_EXIST) { in push()
104 fn push(&mut self, value: BpfQueueValue, flags: BpfMapUpdateElemFlags) -> Result<()> { in push()
106 if flags.contains(BpfMapUpdateElemFlags::BPF_EXIST) { in push()
130 fn update_elem(&mut self, _key: &[u8], value: &[u8], flags: u64) -> Result<()> { in update_elem()
131 let flag = BpfMapUpdateElemFlags::from_bits_truncate(flags); in update_elem()
143 fn push_elem(&mut self, value: &[u8], flags: u64) -> Result<()> { in push_elem()
144 self.update_elem(&[], value, flags) in push_elem()
H A Dhash_map.rs45 fn update_elem(&mut self, key: &[u8], value: &[u8], flags: u64) -> Result<()> { in update_elem()
46 let _flags = BpfMapUpdateElemFlags::from_bits_truncate(flags); in update_elem()
54 fn for_each_elem(&mut self, cb: BpfCallBackFn, ctx: *const u8, flags: u64) -> Result<u32> { in for_each_elem()
55 if flags != 0 { in for_each_elem()
129 fn update_elem(&mut self, key: &[u8], value: &[u8], flags: u64) -> Result<()> { in update_elem()
130 self.per_cpu_maps.get_mut().update_elem(key, value, flags) in update_elem()
135 fn for_each_elem(&mut self, cb: BpfCallBackFn, ctx: *const u8, flags: u64) -> Result<u32> { in for_each_elem()
136 self.per_cpu_maps.get_mut().for_each_elem(cb, ctx, flags) in for_each_elem()
/DragonOS/kernel/src/virt/kvm/
H A Dvm.rs90 flags: mem.flags, // 虚机内存区间属性 in set_user_memory_region()
105 || (new_slot.flags ^ old_slot.flags & KVM_MEM_READONLY) != 0 in set_user_memory_region()
112 } else if new_slot.flags != old_slot.flags { in set_user_memory_region()
127 new_slot.flags = 0; in set_user_memory_region()
146 if (new_slot.flags & KVM_MEM_LOG_DIRTY_PAGES) == 0 { in set_user_memory_region()
172 if mem.flags & !valid_flags != 0 { in check_memory_region_flag()
/DragonOS/kernel/src/bpf/helper/
H A Dmod.rs51 flags: u64, in raw_perf_event_output()
58 let res = perf_event_output(ctx, &map, flags, data); in raw_perf_event_output()
70 flags: u64, in perf_event_output()
74 let index = flags as u32; in perf_event_output()
75 let flags = (flags >> 32) as u32; in perf_event_output() localVariable
85 crate::perf::perf_event_output(ctx, fd as usize, flags, data)?; in perf_event_output()
122 flags: u64, in raw_map_update_elem()
130 let res = map_update_elem(&map, key, value, flags); in raw_map_update_elem()
138 pub fn map_update_elem(map: &Arc<BpfMap>, key: &[u8], value: &[u8], flags: u64) -> Result<()> { in map_update_elem()
140 let value = binding.update_elem(key, value, flags); in map_update_elem()
[all …]
/DragonOS/kernel/src/common/
H A Dspinlock.h100 #define spin_lock_irqsave(lock, flags) … argument
103 …local_irq_save(flags); …
111 #define spin_unlock_irqrestore(lock, flags) … argument
115 …local_irq_restore(flags); …
/DragonOS/kernel/src/mm/
H A Dmemblock.rs68 flags: MemoryAreaAttr, in add_range()
88 .do_add_block(&mut inner, block, false, flags) in add_range()
97 self.do_add_block(&mut inner, block, true, flags) in add_range()
108 flags: MemoryAreaAttr, in do_add_block()
140 self.do_insert_area(inner, i, base, range_base - base, flags); in do_add_block()
156 self.do_insert_area(inner, i, base, end - base, flags); in do_add_block()
176 flags: MemoryAreaAttr, in do_insert_area()
182 inner.initial_memory_regions[index] = PhysMemoryArea::new(base, size, flags); in do_insert_area()
202 let next_flags = inner.initial_memory_regions[(i + 1) as usize].flags; in do_merge_blocks()
205 if this.base + this.size != next_base || this.flags != next_flags { in do_merge_blocks()
[all …]
H A Dfault.rs55 flags: FaultFlags, field
70 flags: FaultFlags, in new()
80 flags, in new()
108 pub fn flags(&self) -> FaultFlags { in flags() method
109 self.flags in flags()
126 let flags = pfm.flags(); in handle_mm_fault() localVariable
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()
170 let page_flags = vma.lock_irqsave().flags(); in handle_normal_fault()
[all …]
H A Dpage.rs203 if page.read_irqsave().flags.contains(PageFlags::PG_DIRTY) { in shrink_list()
243 mapper.get_entry(virt, 0).unwrap().flags().set_write(false), in page_writeback()
280 if page.read_irqsave().flags().contains(PageFlags::PG_DIRTY) { in flush_dirty_pages()
344 flags: PageFlags, field
361 flags: PageFlags::empty(), in new()
437 pub fn flags(&self) -> &PageFlags { in flags() method
438 &self.flags in flags()
442 pub fn set_flags(&mut self, flags: PageFlags) { in set_flags()
443 self.flags = flags in set_flags()
447 pub fn add_flags(&mut self, flags: PageFlags) { in add_flags()
[all …]
H A Dno_init.rs144 let flags: EntryFlags<MMArch> = EntryFlags::new().set_write(true); in pseudo_map_phys() localVariable
146 pseudo_map_phys_with_flags(vaddr, paddr, count, flags); in pseudo_map_phys()
153 let flags: EntryFlags<MMArch> = EntryFlags::new().set_write(false).set_execute(true); in pseudo_map_phys_ro() localVariable
155 pseudo_map_phys_with_flags(vaddr, paddr, count, flags); in pseudo_map_phys_ro()
163 flags: EntryFlags<MMArch>, in pseudo_map_phys_with_flags()
180 mapper.map_phys(vaddr, paddr, flags).unwrap(); in pseudo_map_phys_with_flags()
/DragonOS/kernel/src/time/
H A Dclocksource.rs439 .flags in clocksource_enqueue_watchdog()
445 .flags in clocksource_enqueue_watchdog()
452 .flags in clocksource_enqueue_watchdog()
457 .flags in clocksource_enqueue_watchdog()
500 cs_data.flags.remove( in set_unstable()
504 .flags in set_unstable()
539 .flags in clocksource_dequeue_watchdog()
556 .flags in clocksource_dequeue_watchdog()
568 .flags in clocksource_dequeue_watchdog()
603 .flags in clocksource_dequeue_watchdog()
[all …]
/DragonOS/kernel/src/filesystem/
H A Deventfd.rs40 flags: EventFdFlags, field
46 pub fn new(count: u64, flags: EventFdFlags, id: u32) -> Self { in new()
47 EventFd { count, flags, id } in new()
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()
262 pub fn sys_eventfd(init_val: u32, flags: u32) -> Result<usize, SystemError> { in sys_eventfd()
263 let flags = EventFdFlags::from_bits(flags).ok_or(SystemError::EINVAL)?; in sys_eventfd() localVariable
268 let eventfd = EventFd::new(init_val as u64, flags, id); in sys_eventfd()
270 let filemode = if flags.contains(EventFdFlags::EFD_CLOEXEC) { in sys_eventfd()
/DragonOS/kernel/src/sched/
H A Dmod.rs99 fn enqueue(rq: &mut CpuRunQueue, pcb: Arc<ProcessControlBlock>, flags: EnqueueFlag); in enqueue()
102 fn dequeue(rq: &mut CpuRunQueue, pcb: Arc<ProcessControlBlock>, flags: DequeueFlag); in dequeue()
111 flags: WakeupFlags, in check_preempt_currnet()
399 pub fn enqueue_task(&mut self, pcb: Arc<ProcessControlBlock>, flags: EnqueueFlag) { in enqueue_task()
400 if !flags.contains(EnqueueFlag::ENQUEUE_NOCLOCK) { in enqueue_task()
404 if !flags.contains(EnqueueFlag::ENQUEUE_RESTORE) { in enqueue_task()
412 SchedPolicy::CFS => CompletelyFairScheduler::enqueue(self, pcb, flags), in enqueue_task()
415 SchedPolicy::IDLE => IdleScheduler::enqueue(self, pcb, flags), in enqueue_task()
421 pub fn dequeue_task(&mut self, pcb: Arc<ProcessControlBlock>, flags: DequeueFlag) { in dequeue_task()
424 if !flags.contains(DequeueFlag::DEQUEUE_NOCLOCK) { in dequeue_task()
[all …]
/DragonOS/kernel/src/driver/input/ps2_mouse/
H A Dps_mouse_device.rs113 flags: MouseFlags, field
123 flags: MouseFlags::empty(), in new()
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()
294 let flags: MouseFlags = MouseFlags::from_bits_truncate(packet); in process_packet() localVariable
295 if !flags.contains(MouseFlags::ALWAYS_ONE) { in process_packet()
298 guard.current_state.flags = flags; in process_packet()
301 let flags = guard.current_state.flags; in process_packet() localVariable
[all …]
/DragonOS/kernel/src/syscall/
H A Dmod.rs94 let flags = args[1] as u32; in handle() localVariable
97 Self::open(path, flags, mode, true) in handle()
127 let flags = args[4] as u32; in handle() localVariable
128 Self::do_renameat2(oldfd, oldname, newfd, newname, flags) in handle()
134 let flags = args[2] as u32; in handle() localVariable
137 Self::openat(dirfd, path, flags, mode, true) in handle()
336 let flags = FileMode::from_bits_truncate(arg1 as u32); in handle() localVariable
337 Self::pipe2(pipefd, flags) in handle()
344 let flags = args[2] as u32; in handle() localVariable
345 Self::unlinkat(dirfd, path, flags) in handle()
[all …]
/DragonOS/user/apps/test-mount/src/
H A Dmain.rs18 let flags = MS_BIND; in main() localVariable
20 let result = unsafe { mount(source, target, fstype, flags, data) }; in main()
27 let result = unsafe { mount(source, target, fstype, flags, data) }; in main()
/DragonOS/kernel/src/namespaces/
H A Dnamespace.rs100 pub fn prepare_nsset(flags: u64) -> Result<NsSet, SystemError> { in prepare_nsset()
103 flags, in prepare_nsset()
105 nsproxy: create_new_namespaces(flags, &current, USER_NS.clone())?, in prepare_nsset()
110 let flags = CloneFlags::from_bits_truncate(nsset.flags); in commit_nsset() localVariable
112 if flags.contains(CloneFlags::CLONE_NEWNS) { in commit_nsset()
H A Dsyscall.rs40 pub fn sys_setns(_fd: i32, flags: u64) -> Result<usize, SystemError> { in sys_setns()
41 let check = check_unshare_flags(flags)?; in sys_setns()
43 let nsset = prepare_nsset(flags)?; in sys_setns()
/DragonOS/kernel/src/process/
H A Dkthread.rs63 flags: KernelThreadFlags, field
70 flags: KernelThreadFlags::empty(), in new()
74 pub fn flags(&self) -> &KernelThreadFlags { in flags() method
75 &self.flags in flags()
79 &mut self.flags in flags_mut()
280 .flags in init_stage1()
294 .flags in init_stage1()
304 .flags() in init_stage2()
382 if !pcb.flags().contains(ProcessFlags::KTHREAD) { in stop()
397 .flags in stop()
[all …]
/DragonOS/kernel/src/arch/x86_64/mm/
H A Dfault.rs79 if !entry.flags().has_execute() { in show_fault_oops()
181 let mut flags: FaultFlags = FaultFlags::FAULT_FLAG_ALLOW_RETRY in do_user_addr_fault() localVariable
213 flags |= FaultFlags::FAULT_FLAG_USER; in do_user_addr_fault()
219 flags |= FaultFlags::FAULT_FLAG_WRITE; in do_user_addr_fault()
222 flags |= FaultFlags::FAULT_FLAG_WRITE; in do_user_addr_fault()
225 flags |= FaultFlags::FAULT_FLAG_INSTRUCTION; in do_user_addr_fault()
292 let message = PageFaultMessage::new(vma.clone(), address, flags, mapper); in do_user_addr_fault()
301 flags |= FaultFlags::FAULT_FLAG_TRIED; in do_user_addr_fault()

12345