Home
last modified time | relevance | path

Searched refs:value (Results 1 – 25 of 65) sorted by relevance

123

/DragonOS-0.1.9/kernel/src/common/
Datomic.h16 #define atomic_read(atomic) ((atomic)->value) // 读取原子变量
17 #define atomic_set(atomic, val) (((atomic)->value) = (val)) // 设置原子变量的初始值
21 volatile long value; member
33 : "=m"(ato->value) in atomic_add()
47 : "=m"(ato->value) in atomic_sub()
60 : "=m"(ato->value) in atomic_inc()
61 : "m"(ato->value) in atomic_inc()
73 : "=m"(ato->value) in atomic_dec()
74 : "m"(ato->value) in atomic_dec()
86 : "=m"(ato->value) in atomic_set_mask()
[all …]
Dhid.h101 int value; // hid对象的值 member
132 uint32_t value; // 暂存当前的值 member
153 int value; member
159 int value; member
/DragonOS-0.1.9/kernel/src/libs/
Dvolatile.rs8 ($data: expr, $value: expr) => {
9 unsafe { core::ptr::write_volatile(core::ptr::addr_of_mut!($data), $value) }
76 pub fn new(value: T) -> Self { in new()
77 Self(value) in new()
94 pub fn new(value: T) -> Self { in new()
95 Self(value) in new()
120 unsafe fn vwrite(self, value: T); in vwrite()
124 unsafe fn vwrite(self, value: T) { in vwrite()
125 (self as *mut T).write_volatile(value) in vwrite()
130 unsafe fn vwrite(self, value: T) { in vwrite()
[all …]
Dlazy_init.rs32 value: UnsafeCell<MaybeUninit<T>>, field
42 value: UnsafeCell::new(MaybeUninit::uninit()), in new()
68 pub fn init(&self, value: T) { in init()
79 (*self.value.get()).as_mut_ptr().write(value); in init()
111 return &*(*self.value.get()).as_ptr(); in get_unchecked()
116 return &mut *(*self.value.get()).as_mut_ptr(); in get_mut_unchecked()
138 if let Some(value) = self.try_get() { in fmt()
139 return write!(f, "Lazy({:?})", value); in fmt()
150 (*self.value.get()).as_mut_ptr().drop_in_place(); in drop()
Dvec_cursor.rs158 pub fn write_u8(&mut self, value: u8) -> Result<u8, SystemError> { in write_u8()
163 self.data[self.pos] = value; in write_u8()
166 return Ok(value); in write_u8()
170 pub fn write_u16(&mut self, value: u16) -> Result<u16, SystemError> { in write_u16()
175 self.data[self.pos] = (value & 0xff) as u8; in write_u16()
177 self.data[self.pos] = ((value >> 8) & 0xff) as u8; in write_u16()
180 return Ok(value); in write_u16()
184 pub fn write_u32(&mut self, value: u32) -> Result<u32, SystemError> { in write_u32()
190 self.data[self.pos] = ((value >> (i * 8)) & 0xff) as u8; in write_u32()
194 return Ok(value); in write_u32()
[all …]
/DragonOS-0.1.9/kernel/src/driver/hid/
Dhidparse.c21 static const char *hid_get_collection_str(const int value);
61 static __always_inline uint32_t __format_value(uint32_t value, uint8_t size) in __format_value() argument
66 value = (uint32_t)(uint8_t)value; in __format_value()
69 value = (uint32_t)(uint16_t)value; in __format_value()
72 return value; in __format_value()
131 parser->value = 0; in hid_parse()
133 …memcpy(&parser->value, &parser->report_desc[parser->pos], item_size[parser->item & HID_SIZE_MASK]); in hid_parse()
153 parser->u_page = (int)parser->value; in hid_parse()
163 parser->usage_table[parser->usage_size].u_page = (int)(parser->value >> 16); in hid_parse()
169 hid_get_usage_type_str(parser->u_page, parser->value & 0xffff)); in hid_parse()
[all …]
/DragonOS-0.1.9/kernel/src/filesystem/fat/
Dutils.rs8 pub fn decode_u8_ascii(value: u8) -> char { in decode_u8_ascii()
9 if value <= 0x7f { in decode_u8_ascii()
10 return value as char; in decode_u8_ascii()
/DragonOS-0.1.9/docs/kernel/locking/
Drwlock.md133 let value = *guard;
137 "Reader1: the value is {value}
144 let value = *guard;
148 "Reader2: the value is {value}
159 "Writers: the value is {guard}
164 let value=*read_guard;
165 println!("After downgraded to read_guard: {value}");
170 let value = *guard;
174 "Upgrader1 before upgrade: the value is {value}
182 "Upgrader1 after upgrade: the value is {temp}
[all …]
/DragonOS-0.1.9/kernel/src/arch/x86_64/include/asm/
Dasm.h231 void io_out8(unsigned short port, unsigned char value) in io_out8() argument
236 : "a"(value), "d"(port) in io_out8()
241 void io_out32(unsigned short port, unsigned int value) in io_out32() argument
246 : "a"(value), "d"(port) in io_out32()
333 static __always_inline void __write8b(uint64_t vaddr, uint64_t value) in __write8b() argument
335 asm volatile("movq %%rdx, 0(%%rax)" ::"a"(vaddr), "d"(value) in __write8b()
346 static __always_inline void __write4b(uint64_t vaddr, uint32_t value) in __write4b() argument
348 asm volatile("movl %%edx, 0(%%rax)" ::"a"(vaddr), "d"(value) in __write4b()
/DragonOS-0.1.9/kernel/src/arch/x86_64/kvm/vmx/
Dvmx_asm_wrapper.rs26 pub fn vmx_vmwrite(vmcs_field: u32, value: u64) -> Result<(), SystemError> { in vmx_vmwrite()
27 match unsafe { x86::bits64::vmx::vmwrite(vmcs_field, value) } { in vmx_vmwrite()
40 Ok(value) => Ok(value), in vmx_vmread()
/DragonOS-0.1.9/kernel/src/process/
Dresource.rs66 fn try_from(value: i32) -> Result<Self, Self::Error> { in try_from()
67 match value { in try_from()
135 fn try_from(value: usize) -> Result<Self, Self::Error> { in try_from()
136 <Self as FromPrimitive>::from_usize(value).ok_or(SystemError::EINVAL) in try_from()
/DragonOS-0.1.9/kernel/src/driver/timers/hpet/
Dmod.rs45 pub unsafe fn write_main_counter_value(&mut self, value: u64) { in write_main_counter_value()
47 volwrite!(p, main_counter_value, value); in write_main_counter_value()
56 pub unsafe fn write_general_config(&mut self, value: u64) { in write_general_config()
58 volwrite!(p, general_config, value); in write_general_config()
/DragonOS-0.1.9/kernel/src/net/
Dmod.rs103 fn from(value: smoltcp::wire::IpProtocol) -> Self { in from()
104 let x: u8 = value.into(); in from()
110 fn from(value: u8) -> Self { in from()
111 match value { in from()
122 _ => Protocol::Unknown(value), in from()
/DragonOS-0.1.9/kernel/src/arch/riscv64/include/asm/
Dasm.h41 void io_out8(unsigned short port, unsigned char value) { in io_out8() argument
47 void io_out32(unsigned short port, unsigned int value) { in io_out32() argument
/DragonOS-0.1.9/kernel/crates/bitmap/src/
Dtraits.rs8 fn set(bits: &mut Self, index: usize, value: bool) -> bool; in set()
9 fn set_value(bits: &mut Self, value: Self); in set_value()
38 fn set(bits: &mut Self, index: usize, value: bool) -> bool {
41 if value {
50 fn set_value(bits: &mut Self, value: Self) {
51 *bits = value;
238 fn set(&mut self, index: usize, value: bool) -> Option<bool>; in set()
241 fn set_all(&mut self, value: bool); in set_all()
Dalloc_bitmap.rs30 fn set(&mut self, index: usize, value: bool) -> Option<bool> { in set()
31 return self.core.set(self.elements, &mut self.data, index, value); in set()
107 fn set_all(&mut self, value: bool) { in set_all()
108 self.core.set_all(self.elements, &mut self.data, value); in set_all()
Dstatic_bitmap.rs40 fn set(&mut self, index: usize, value: bool) -> Option<bool> { in set()
41 return self.core.set(N, &mut self.data, index, value); in set()
117 fn set_all(&mut self, value: bool) { in set_all()
118 self.core.set_all(N, &mut self.data, value); in set_all()
/DragonOS-0.1.9/kernel/src/driver/firmware/efi/
Dfdt.rs78 fn try_from(value: &str) -> Result<Self, Self::Error> { in try_from()
79 match value { in try_from()
163 if prop.value.len() == 4 { in do_get_fdt_prop()
164 val = u32::from_be_bytes(prop.value[0..4].try_into().unwrap()) as u64; in do_get_fdt_prop()
166 val = u64::from_be_bytes(prop.value[0..8].try_into().unwrap()); in do_get_fdt_prop()
/DragonOS-0.1.9/tools/debugging/logmonitor/src/backend/monitor/
Dlogset.rs39 pub fn insert(&mut self, key: K, value: V) { in insert()
40 let cloned_value = value.clone(); in insert()
41 self.backend.before_insert(&self.name, &value); in insert()
43 let prev = self.inner.insert(key, value); in insert()
/DragonOS-0.1.9/kernel/src/smp/cpu/
Dmod.rs37 pub unsafe fn set_possible_cpu(&self, cpu: ProcessorId, value: bool) { in set_possible_cpu()
41 p.possible_cpus.set(cpu, value); in set_possible_cpu()
/DragonOS-0.1.9/kernel/src/mm/
Dpage.rs342 pub fn update_flags(mut self, flag: usize, value: bool) -> Self { in update_flags()
343 if value { in update_flags()
367 pub fn set_user(self, value: bool) -> Self { in set_user()
368 return self.update_flags(Arch::ENTRY_FLAG_USER, value); in set_user()
386 pub fn set_write(self, value: bool) -> Self { in set_write()
391 .update_flags(Arch::ENTRY_FLAG_READONLY, !value) in set_write()
392 .update_flags(Arch::ENTRY_FLAG_READWRITE, value); in set_write()
397 if value { in set_write()
416 pub fn set_execute(self, mut value: bool) -> Self { in set_execute()
421 value = true; in set_execute()
[all …]
/DragonOS-0.1.9/kernel/src/arch/riscv64/ipc/
Dsignal.rs66 fn from(value: usize) -> Self { in from()
67 if value <= MAX_SIG_NUM { in from()
68 let ret: Signal = unsafe { core::mem::transmute(value) }; in from()
84 fn from(value: i32) -> Self { in from()
85 if value < 0 { in from()
89 return Self::from(value as usize); in from()
/DragonOS-0.1.9/kernel/src/filesystem/procfs/
Dsyscall.rs30 fn from(value: usize) -> Self { in from()
31 match value { in from()
Dlog.rs42 fn from(value: usize) -> Self { in from()
43 match value { in from()
/DragonOS-0.1.9/build-scripts/kernel_build/src/utils/
Dcargo_handler.rs26 if let Ok(value) = env::var(key) { in readenv()
27 Some(value) in readenv()

123