/DragonOS-0.1.8/kernel/src/common/ |
D | atomic.h | 15 #define atomic_set(atomic,val) (((atomic)->value) = (val)) // 设置原子变量的初始值 argument 28 inline void atomic_add(atomic_t *ato, long val) in atomic_add() argument 32 : "m"(val) in atomic_add() 42 inline void atomic_sub(atomic_t *ato, long val) in atomic_sub() argument 46 : "m"(val) in atomic_sub()
|
D | compiler.h | 136 #define WRITE_ONCE(x, val) \ argument 142 } __u = {.val = (val)}; \
|
/DragonOS-0.1.8/kernel/src/driver/interrupt/apic/ |
D | apic_timer.h | 51 register uint32_t val = (mode << 17) | vector | (mask ? (APIC_LVT_INT_MASKED) : 0); in apic_timer_set_LVT() local 53 wrmsr(0x832, val); in apic_timer_set_LVT() 55 __write4b(APIC_LOCAL_APIC_VIRT_BASE_ADDR + LOCAL_APIC_OFFSET_Local_APIC_LVT_TIMER, val); in apic_timer_set_LVT() 97 uint32_t val = apic_timer_get_LVT(); \ 98 val |= APIC_LVT_INT_MASKED; \ 99 apic_timer_write_LVT(val); \
|
D | apic_timer.c | 32 uint64_t val = apic_timer_get_LVT(); in apic_timer_enable() local 34 val &= (~APIC_LVT_INT_MASKED); in apic_timer_enable() 36 apic_timer_write_LVT(val); in apic_timer_enable()
|
/DragonOS-0.1.8/docs/kernel/core_api/ |
D | atomic.md | 11 ### `inline void atomic_add(atomic_t *ato, long val)` 23 **val** 27 ### `inline void atomic_sub(atomic_t *ato, long val)` argument 39 **val**
|
/DragonOS-0.1.8/kernel/src/ktest/ |
D | test-bitree.c | 38 int val; in ktest_bitree_case1() local 61 val = bt_insert(tree, tv2); in ktest_bitree_case1() 62 assert(val == 0); in ktest_bitree_case1() 70 val = bt_insert(tree, tv3); in ktest_bitree_case1() 71 assert(val == 0); in ktest_bitree_case1() 92 val = bt_insert(tree, tv4); in ktest_bitree_case1() 93 assert(val == 0); in ktest_bitree_case1()
|
/DragonOS-0.1.8/kernel/src/driver/tty/ |
D | mod.rs | 107 let val = self.write_stdin(buf, block)?; in input() localVariable 110 self.write_output(&buf[0..val], true)?; in input() 112 return Ok(val); in input() 159 let val: Result<mpsc::RecvRef<u8>, TryRecvError> = self.stdin_rx.try_recv_ref(); in read_stdin() localVariable 160 if let Err(err) = val { in read_stdin() 173 let x = *val.unwrap(); in read_stdin() 234 let val: Result<mpsc::RecvRef<u8>, TryRecvError> = self.output_rx.try_recv_ref(); in read_output() localVariable 235 if let Err(err) = val { in read_output() 248 buf[cnt] = *val.unwrap(); in read_output()
|
/DragonOS-0.1.8/kernel/src/libs/ |
D | volatile.rs | 17 ($data: expr, $val: expr, $flag: expr) => { 21 true => core::ptr::read_volatile(core::ptr::addr_of!($data)) | $val, 22 false => core::ptr::read_volatile(core::ptr::addr_of!($data)) & (!$val), 33 ($data: expr, $bits: expr, $val: expr) => { 35 volatile_set_bit!($data, ($val) & ($bits), true);
|
D | int_like.rs | 70 pub fn store(&self, val: $new_type_name, order: ::core::sync::atomic::Ordering) { 71 self.container.store(val.into(), order) 76 val: $new_type_name, 79 $new_type_name::from(self.container.swap(val.into(), order))
|
D | lz4.c | 374 U16 val; in LZ4_read16() local 375 LZ4_memcpy(&val, memPtr, sizeof(val)); in LZ4_read16() 376 return val; in LZ4_read16() 381 U32 val; in LZ4_read32() local 382 LZ4_memcpy(&val, memPtr, sizeof(val)); in LZ4_read32() 383 return val; in LZ4_read32() 388 reg_t val; in LZ4_read_ARCH() local 389 LZ4_memcpy(&val, memPtr, sizeof(val)); in LZ4_read_ARCH() 390 return val; in LZ4_read_ARCH() 553 static unsigned LZ4_NbCommonBytes(reg_t val) in LZ4_NbCommonBytes() argument [all …]
|
D | spinlock.rs | 36 let val = unsafe { read_volatile(&lock.lock as *const i8) }; in spin_is_locked() localVariable 38 return if val == 0 { true } else { false }; in spin_is_locked()
|
/DragonOS-0.1.8/kernel/src/time/ |
D | mod.rs | 343 fn from(val: Duration) -> Self { in from() 344 ::core::time::Duration::from_micros(val.total_micros()) in from() 350 fn from(val: smoltcp::time::Instant) -> Self { in from() 351 Instant::from_micros(val.micros()) in from() 363 fn from(val: smoltcp::time::Duration) -> Self { in from() 364 Duration::from_micros(val.micros()) in from()
|
/DragonOS-0.1.8/kernel/src/arch/x86_64/ |
D | syscall.rs | 30 ($val:expr, $regs:expr) => {{ 31 let ret = $val;
|
/DragonOS-0.1.8/kernel/src/driver/disk/ahci/ |
D | hba.rs | 150 let val: u32 = volatile_read!(self.cmd) | HBA_PORT_CMD_FRE | HBA_PORT_CMD_ST; in start() localVariable 151 volatile_write!(self.cmd, val); in start()
|
/DragonOS-0.1.8/kernel/src/process/ |
D | process.c | 179 int val = 0; in initial_kernel_thread() local 180 val = scm_enable_double_buffer(); in initial_kernel_thread()
|
/DragonOS-0.1.8/kernel/src/driver/uart/ |
D | uart.rs | 53 pub fn from_u16(val: u16) -> Result<Self, &'static str> { in from_u16() 54 match val { in from_u16()
|
/DragonOS-0.1.8/kernel/src/filesystem/fat/ |
D | fs.rs | 945 let val = if (cluster & 0x1) > 0 { in get_free_cluster() localVariable 950 if val == 0 { in get_free_cluster() 991 let val = cursor.read_u16()?; in get_free_cluster() localVariable 993 if val == 0 { in get_free_cluster() 994 return Ok(Cluster::new(val as u64)); in get_free_cluster() 1023 let val = cursor.read_u32()? & 0x0fffffff; in get_free_cluster() localVariable 1025 if val == 0 { in get_free_cluster()
|