Home
last modified time | relevance | path

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

12

/DragonOS-0.1.8/kernel/src/common/
Datomic.h14 #define atomic_read(atomic) ((atomic)->value) // 读取原子变量
15 #define atomic_set(atomic,val) (((atomic)->value) = (val)) // 设置原子变量的初始值
19 volatile long value; member
31 : "=m"(ato->value) in atomic_add()
45 : "=m"(ato->value) in atomic_sub()
58 : "=m"(ato->value) in atomic_inc()
59 : "m"(ato->value) in atomic_inc()
71 : "=m"(ato->value) in atomic_dec()
72 : "m"(ato->value) in atomic_dec()
84 : "=m"(ato->value) in atomic_set_mask()
[all …]
Dbitree.h9 void *value; // 数据 member
22 int (*release)(void *value);
33 …*bt_create_tree(struct bt_node_t *node, int (*cmp)(void *a, void *b), int (*release)(void *value));
43 …reate_node(struct bt_node_t *left, struct bt_node_t *right, struct bt_node_t *parent, void *value);
52 int bt_insert(struct bt_root_t *root, void *value);
62 int bt_query(struct bt_root_t *root, void *value, uint64_t *ret_addr);
71 int bt_delete(struct bt_root_t *root, void *value);
Dglib.h157 void io_out8(unsigned short port, unsigned char value) in io_out8() argument
162 : "a"(value), "d"(port) in io_out8()
167 void io_out32(unsigned short port, unsigned int value) in io_out32() argument
172 : "a"(value), "d"(port) in io_out32()
284 static __always_inline void __write8b(uint64_t vaddr, uint64_t value) in __write8b() argument
286 asm volatile("movq %%rdx, 0(%%rax)" ::"a"(vaddr), "d"(value) in __write8b()
298 static __always_inline void __write4b(uint64_t vaddr, uint32_t value) in __write4b() argument
300 asm volatile("movl %%edx, 0(%%rax)" ::"a"(vaddr), "d"(value) in __write4b()
Dhid.h101 int value; // hid对象的值 member
132 uint32_t value; // 暂存当前的值 member
153 int value; member
159 int value; member
/DragonOS-0.1.8/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 …]
Dbitree.c8 #define smaller(root, a, b) (root->cmp((a)->value, (b)->value) == -1)
9 #define equal(root, a, b) (root->cmp((a)->value, (b)->value) == 0)
10 #define greater(root, a, b) (root->cmp((a)->value, (b)->value) == 1)
20 … *bt_create_tree(struct bt_node_t *node, int (*cmp)(void *a, void *b), int (*release)(void *value)) in bt_create_tree() argument
43 …create_node(struct bt_node_t *left, struct bt_node_t *right, struct bt_node_t *parent, void *value) in bt_create_node() argument
51 node->value = value; in bt_create_node()
65 int bt_insert(struct bt_root_t *root, void *value) in bt_insert() argument
72 struct bt_node_t *insert_node = bt_create_node(NULL, NULL, NULL, value); in bt_insert()
108 int bt_query(struct bt_root_t *root, void *value, uint64_t *ret_addr) in bt_query() argument
112 tmp_node.value = value; in bt_query()
[all …]
Datomic.rs10 return read_volatile(&(*ato).value); in atomic_read()
16 pub fn atomic_set(ato: *mut atomic_t, value: i64) { in atomic_set()
18 write_volatile(&mut (*ato).value, value); in atomic_set()
24 Self { value: 0 } in default()
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.rs157 pub fn write_u8(&mut self, value: u8) -> Result<u8, SystemError> { in write_u8()
162 self.data[self.pos] = value; in write_u8()
165 return Ok(value); in write_u8()
169 pub fn write_u16(&mut self, value: u16) -> Result<u16, SystemError> { in write_u16()
174 self.data[self.pos] = (value & 0xff) as u8; in write_u16()
176 self.data[self.pos] = ((value >> 8) & 0xff) as u8; in write_u16()
179 return Ok(value); in write_u16()
183 pub fn write_u32(&mut self, value: u32) -> Result<u32, SystemError> { in write_u32()
189 self.data[self.pos] = ((value >> (i * 8)) & 0xff) as u8; in write_u32()
193 return Ok(value); in write_u32()
[all …]
Drefcount.rs19 refs: atomic_t { value: 1 }, in default()
42 refs: $crate::include::bindings::bindings::atomic_t { value: $x },
Dspinlock.rs132 pub unsafe fn set_value(&mut self, value: bool) { in set_value()
133 self.0.store(value, Ordering::SeqCst); in set_value()
202 pub const fn new(value: T) -> Self { in new()
205 data: UnsafeCell::new(value), in new()
/DragonOS-0.1.8/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.8/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.8/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.8/kernel/src/ktest/
Dtest-bitree.c25 static int release(void *value) in release() argument
46 assert(rn->value == tv1); in ktest_bitree_case1()
76 assert(((struct test_value_t *)tree->bt_node->left->value)->tv == tv2->tv); in ktest_bitree_case1()
77 assert(((struct test_value_t *)tree->bt_node->right->value)->tv == tv3->tv); in ktest_bitree_case1()
84 assert(node2->value == tv2); in ktest_bitree_case1()
97 assert(((struct test_value_t *)node2->right->value)->tv == tv4->tv); in ktest_bitree_case1()
109 assert(bt_delete(tree, rn->value) == 0); in ktest_bitree_case1()
110 assert(((struct test_value_t *)tree->bt_node->value)->tv != 20); in ktest_bitree_case1()
/DragonOS-0.1.8/kernel/src/driver/interrupt/apic/
Dapic.c514 void apic_ioapic_write_rte(unsigned char index, ul value) in apic_ioapic_write_rte() argument
520 *apic_ioapic_map.virtual_data_addr = value & 0xffffffff; in apic_ioapic_write_rte()
523 value >>= 32; in apic_ioapic_write_rte()
527 *apic_ioapic_map.virtual_data_addr = value & 0xffffffff; in apic_ioapic_write_rte()
535 ul value = apic_ioapic_read_rte(index); in apic_ioapic_enable() local
536 value &= (~0x10000UL); in apic_ioapic_enable()
537 apic_ioapic_write_rte(index, value); in apic_ioapic_enable()
543 ul value = apic_ioapic_read_rte(index); in apic_ioapic_disable() local
544 value |= (0x10000UL); in apic_ioapic_disable()
545 apic_ioapic_write_rte(index, value); in apic_ioapic_disable()
[all …]
Dapic_timer.h58 static __always_inline void apic_timer_write_LVT(uint32_t value) in apic_timer_write_LVT() argument
61 wrmsr(0x832, value); in apic_timer_write_LVT()
63 __write4b(APIC_LOCAL_APIC_VIRT_BASE_ADDR + LOCAL_APIC_OFFSET_Local_APIC_LVT_TIMER, value); in apic_timer_write_LVT()
/DragonOS-0.1.8/kernel/src/net/
Dmod.rs43 fn try_from(value: i32) -> Result<Self, Self::Error> { in try_from()
45 <Self as FromPrimitive>::from_i32(value).ok_or(SystemError::EINVAL) in try_from()
246 fn from(value: smoltcp::wire::IpProtocol) -> Self { in from()
247 let x: u8 = value.into(); in from()
253 fn from(value: u8) -> Self { in from()
254 match value { in from()
265 _ => Protocol::Unknown(value), in from()
/DragonOS-0.1.8/kernel/src/arch/x86_64/include/asm/
Dasm.h119 void wrmsr(uint64_t address, uint64_t value) in wrmsr() argument
121 __asm__ __volatile__("wrmsr \n\t" ::"d"(value >> 32), "a"(value & 0xffffffff), "c"(address) in wrmsr()
/DragonOS-0.1.8/kernel/src/mm/
Dpage.rs313 pub fn update_flags(mut self, flag: usize, value: bool) -> Self { in update_flags()
314 if value { in update_flags()
338 pub fn set_user(self, value: bool) -> Self { in set_user()
339 return self.update_flags(Arch::ENTRY_FLAG_USER, value); in set_user()
357 pub fn set_write(self, value: bool) -> Self { in set_write()
360 .update_flags(Arch::ENTRY_FLAG_READONLY, !value) in set_write()
361 .update_flags(Arch::ENTRY_FLAG_READWRITE, value); in set_write()
375 pub fn set_execute(self, mut value: bool) -> Self { in set_execute()
380 value = true; in set_execute()
386 .update_flags(Arch::ENTRY_FLAG_NO_EXEC, !value) in set_execute()
[all …]
/DragonOS-0.1.8/kernel/src/process/
Dabi.rs57 fn try_from(value: u32) -> Result<Self, Self::Error> { in try_from()
58 match value { in try_from()
/DragonOS-0.1.8/kernel/src/time/
Dsleep.rs75 Ok(value) => return Ok(value), in usleep()
/DragonOS-0.1.8/user/dadk/config/
Dtest_fstat-0.1.0.dadk30 "value": "__dragonos__"
/DragonOS-0.1.8/docs/userland/libc/apis/api-list/
Derrno.md22 …#define EAGAIN 6 /* 资源不可用,请重试。 Resource unavailable, try again (may be the same value as…
81 #define EMFILE 33 /* 文件描述符的值过大 File descriptor value too large.*/
141 #define ENOTSUP 61 /* 不被支持 Not supported (may be the same value as [EOPNOTSUPP]).*/
147 …SUPP 64 /* 套接字不支持该操作 Operation not supported on socket (may be the same value as [ENOTSUP]).*/
183 … #define EWOULDBLOCK 80 /* 操作将被禁止 Operation would block (may be the same value as [EAGAIN]).*/
/DragonOS-0.1.8/kernel/src/driver/base/map/
Dmod.rs89 Some(value) => { in kobj_lookup()
90 return Some(value.0.clone()); in kobj_lookup()

12