Home
last modified time | relevance | path

Searched refs:data (Results 1 – 25 of 85) sorted by relevance

1234

/DragonOS-0.1.8/kernel/src/libs/
Dvec_cursor.rs13 data: Vec<u8>, field
20 pub fn new(data: Vec<u8>) -> Self { in new()
21 return Self { data: data, pos: 0 }; in new()
27 data: Vec::new(), in zerod()
30 result.data.resize(length, 0); in zerod()
36 return &mut self.data; in get_mut()
41 return &self.data; in get_ref()
46 if self.pos >= self.data.len() { in read_u8()
50 return Ok(self.data[self.pos - 1]); in read_u8()
55 if self.pos + 2 > self.data.len() { in read_u16()
[all …]
Drwlock.rs37 data: UnsafeCell<T>, field
43 data: *const T, field
52 data: *const T, field
60 data: *mut T, field
71 pub const fn new(data: T) -> Self { in new()
74 data: UnsafeCell::new(data), in new()
82 let RwLock { data, .. } = self; in into_inner()
83 return data.into_inner(); in into_inner()
91 return self.data.get(); in as_mut_ptr()
142 data: unsafe { &*self.data.get() }, in inner_try_read()
[all …]
Dvolatile.rs2 ($data: expr) => {
3 unsafe { core::ptr::read_volatile(core::ptr::addr_of!($data)) }
8 ($data: expr, $value: expr) => {
9 unsafe { core::ptr::write_volatile(core::ptr::addr_of_mut!($data), $value) }
17 ($data: expr, $val: expr, $flag: expr) => {
19 $data,
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) => {
34 volatile_set_bit!($data, $bits, false);
[all …]
Dnotifier.rs12 fn notifier_call(&self, action: u64, data: Option<&T>) -> i32; in notifier_call()
81 data: Option<&T>, in call_chain()
91 ret = b.notifier_call(action, data); in call_chain()
127 data: Option<&T>, in call_chain()
131 return notifier_chain_guard.call_chain(action, data, nr_to_call); in call_chain()
165 data: Option<&T>, in call_chain()
169 return notifier_chain_guard.call_chain(action, data, nr_to_call); in call_chain()
192 data: Option<&T>, in call_chain()
195 return self.0.call_chain(action, data, nr_to_call); in call_chain()
/DragonOS-0.1.8/kernel/src/driver/hid/
Dhidparse.c84 parser->data.report_id = 1; // we must give it a non-zero value or the parser doesn't work in hid_reset_parser()
113 static bool hid_parse(struct hid_parser *parser, struct hid_data_t *data) in hid_parse() argument
186 parser->data.path.node[parser->data.path.size].u_page = parser->usage_table[0].u_page; in hid_parse()
187 parser->data.path.node[parser->data.path.size].usage = parser->usage_table[0].usage; in hid_parse()
188 ++parser->data.path.size; in hid_parse()
197 parser->data.path.node[parser->data.path.size].u_page = 0xff; in hid_parse()
198 parser->data.path.node[parser->data.path.size].usage = parser->value & 0x7f; in hid_parse()
199 ++parser->data.path.size; in hid_parse()
208 --parser->data.path.size; // 为什么要--????? in hid_parse()
210 if (parser->data.path.node[parser->data.path.size].u_page == 0xff) in hid_parse()
[all …]
/DragonOS-0.1.8/kernel/src/driver/multiboot2/
Dmultiboot2.c20 void *data, unsigned int *count) in multiboot2_iter() argument
30 if (_fun(tag, data, count) == true) in multiboot2_iter()
56 bool multiboot2_get_memory(const struct iter_data_t *_iter_data, void *data, unsigned int *count) in multiboot2_get_memory() argument
61 struct multiboot_mmap_entry_t *resource = (struct multiboot_mmap_entry_t *)data; in multiboot2_get_memory()
81 bool multiboot2_get_VBE_info(const struct iter_data_t *_iter_data, void *data, unsigned int *reserv… in multiboot2_get_VBE_info() argument
86 *(struct multiboot_tag_vbe_t *)data = *(struct multiboot_tag_vbe_t *)_iter_data; in multiboot2_get_VBE_info()
96 bool multiboot2_get_Framebuffer_info(const struct iter_data_t *_iter_data, void *data, unsigned int… in multiboot2_get_Framebuffer_info() argument
100 …*(struct multiboot_tag_framebuffer_info_t *)data = *(struct multiboot_tag_framebuffer_info_t *)_it… in multiboot2_get_Framebuffer_info()
112 bool multiboot2_get_acpi_old_RSDP(const struct iter_data_t *_iter_data, void *data, unsigned int *r… in multiboot2_get_acpi_old_RSDP() argument
117 *(struct multiboot_tag_old_acpi_t *)data = *(struct multiboot_tag_old_acpi_t *)_iter_data; in multiboot2_get_acpi_old_RSDP()
[all …]
/DragonOS-0.1.8/kernel/src/common/
Dkthread.h18 void *data; member
24 struct process_control_block *kthread_create_on_node(int (*thread_fn)(void *data), void *data, int …
36 #define kthread_create(thread_fn, data, name_fmt, arg...) … argument
37 kthread_create_on_node(thread_fn, data, NUMA_NO_NODE, name_fmt, ##arg)
47 #define kthread_run(thread_fn, data, name_fmt, ...) … argument
49 … struct process_control_block *__kt = kthread_create(thread_fn, data, name_fmt, ##__VA_ARGS__); \
63 #define kthread_run_rt(thread_fn, data, name_fmt, ...) … argument
65 …struct process_control_block *__kt = kthread_create(thread_fn, data, name_fmt, ##__VA_ARGS__); …
/DragonOS-0.1.8/kernel/src/process/
Dkthread.c27 int (*thread_fn)(void *data);
28 void *data; member
50 …process_control_block *__kthread_create_on_node(int (*thread_fn)(void *data), void *data, int node, in __kthread_create_on_node() argument
61 create->data = data; in __kthread_create_on_node()
138 struct process_control_block *kthread_create_on_node(int (*thread_fn)(void *data), void *data, int … in kthread_create_on_node() argument
144 pcb = __kthread_create_on_node(thread_fn, data, node, name_fmt, args); in kthread_create_on_node()
158 int (*thread_fn)(void *data) = create->thread_fn; in kthread()
159 void *data = create->data; in kthread() local
166 self->data = data; in kthread()
187 retval = thread_fn(data); in kthread()
/DragonOS-0.1.8/kernel/src/arch/x86_64/pci/
Dpci.rs30 fn write_config(bus_device_function: &BusDeviceFunction, offset: u8, data: u32) { in write_config()
39 io_out32(PORT_PCI_CONFIG_DATA, data); in write_config()
44 return pci_address.data(); in address_pci_to_physical()
48 let mut data: usize = 0; in ecam_root() localVariable
49 let data_point = &mut data; in ecam_root()
54 if data == 0 { in ecam_root()
59 let head = NonNull::new(data as *mut acpi_system_description_table_header_t).unwrap(); in ecam_root()
/DragonOS-0.1.8/kernel/src/
Dlink.lds18 head.o(.bootstrap.data)
35 .data (data_start_pa): AT(data_start_pa - KERNEL_VMA)
38 *(.data)
57 .data.init_proc_union (init_proc_union_start_pa): AT(init_proc_union_start_pa - KERNEL_VMA)
58 { *(.data.init_proc_union) }
/DragonOS-0.1.8/user/apps/test_signal/
Dlink.lds23 .data :
26 *(.data) argument
27 *(.data.*)
/DragonOS-0.1.8/user/apps/shell/
Dshell.lds23 .data :
26 *(.data) argument
27 *(.data.*)
/DragonOS-0.1.8/user/apps/about/
Dabout.lds23 .data :
26 *(.data) argument
27 *(.data.*)
/DragonOS-0.1.8/kernel/src/mm/allocator/
Dbump.rs53 let area_base = (area.base.data() + (MMA::PAGE_SIZE - 1)) & !(MMA::PAGE_SIZE - 1); in allocate()
56 let area_end = (area.base.data() + area.size) & !(MMA::PAGE_SIZE - 1); in allocate()
71 if offset + count.data() * MMA::PAGE_SIZE <= area_end { in allocate()
74 self.offset = offset + count.data() * MMA::PAGE_SIZE; in allocate()
94 let area_base = (area.base.data() + MMA::PAGE_SHIFT) & !(MMA::PAGE_SHIFT); in usage()
96 let area_end = (area.base.data() + area.size) & !(MMA::PAGE_SHIFT); in usage()
/DragonOS-0.1.8/kernel/src/mm/
Dpage.rs111 Arch::write::<usize>(entry_virt, entry.data()); in set_entry()
140 let addr = VirtAddr::new(addr.data() & Arch::PAGE_ADDRESS_MASK); in index_of()
147 return Some((addr.data() >> shift) & MMArch::PAGE_ENTRY_MASK); in index_of()
169 data: usize, field
175 f.write_fmt(format_args!("PageEntry({:#x})", self.data)) in fmt()
181 pub fn new(data: usize) -> Self { in new()
183 data, in new()
189 pub fn data(&self) -> usize { in data() method
190 self.data in data()
201 let paddr = PhysAddr::new(self.data & Arch::PAGE_ADDRESS_MASK); in address()
[all …]
Dmod.rs95 pub fn data(&self) -> usize { in data() method
200 pub fn data(&self) -> usize { in data() method
394 return ptr::read(address.data() as *const T); in read()
400 ptr::write(address.data() as *mut T, value); in write()
405 ptr::write_bytes(address.data() as *mut u8, value, count); in write_bytes()
427 if let Some(vaddr) = phys.data().checked_add(Self::PHYS_OFFSET) { in phys_2_virt()
445 if let Some(paddr) = virt.data().checked_sub(Self::PHYS_OFFSET) { in virt_2_phys()
495 if unlikely(end.data() <= start.data()) { in between()
498 let size = end.data() - start.data(); in between()
577 let offset = vaddr.data() - self.start().data(); in rebase()
[all …]
/DragonOS-0.1.8/kernel/src/time/
Dclocksource.rs61 pub fn data(&self) -> u64 { in data() method
67 CycleNum(self.data() + other.data()) in add()
71 CycleNum(self.data() - other.data()) in div()
399 let data = self.clocksource_data(); in clocksource_dequeue_watchdog() localVariable
413 if ele_data.name.eq(&data.name) && ele_data.rating.eq(&data.rating) { in clocksource_dequeue_watchdog()
419 if data in clocksource_dequeue_watchdog()
429 } else if watchdog.name.eq(&data.name) && watchdog.rating.eq(&data.rating) { in clocksource_dequeue_watchdog()
447 if ele_data.name.eq(&data.name) && ele_data.rating.eq(&data.rating) in clocksource_dequeue_watchdog()
496 let data = self.clocksource_data(); in clocksource_dequeue() localVariable
500 if ele_data.name.eq(&data.name) && ele_data.rating.eq(&data.rating) { in clocksource_dequeue()
[all …]
Djiffies.rs30 data: ClocksourceData, field
41 return inner.data.clone(); in clocksource_data()
48 let d = &mut self.0.lock().data; in update_clocksource_data()
65 let data = ClocksourceData { in new() localVariable
76 data, in new()
/DragonOS-0.1.8/kernel/src/sched/
Dcompletion.c223 struct __test_data *data = (struct __test_data *)input_data; in __test_completion_waiter() local
226 if (!try_wait_for_completion(data->one_to_many)) in __test_completion_waiter()
228 wait_for_completion(data->one_to_many); in __test_completion_waiter()
232 if (!try_wait_for_completion(data->one_to_many)) in __test_completion_waiter()
234 wait_for_completion(data->one_to_many); in __test_completion_waiter()
238 complete(data->many_to_one); in __test_completion_waiter()
252 struct __test_data *data = (struct __test_data *)input_data; in __test_completion_worker() local
255 if (!try_wait_for_completion(data->one_to_many)) in __test_completion_worker()
257 wait_for_completion(data->one_to_many); in __test_completion_worker()
263 complete(data->one_to_one); in __test_completion_worker()
[all …]
/DragonOS-0.1.8/kernel/src/filesystem/procfs/
Dmod.rs77 data: Vec<u8>, field
82 return ProcfsFilePrivateData { data: Vec::new() }; in new()
96 data: Vec<u8>, field
109 fn trim_string(&self, data: &mut Vec<u8>) { in trim_string()
110 data.drain_filter(|x: &mut u8| *x == 0); in trim_string()
111 data.push(0); in trim_string()
131 let pdata: &mut Vec<u8> = &mut pdata.data; in open_status()
179 let data = (address_space_guard.end_data - address_space_guard.start_data) / 1024; in open_status() localVariable
187 pdata.append(&mut format!("\nVmData:\t{} kB", data).as_bytes().to_owned()); in open_status()
204 let start = _pdata.data.len().min(offset); in read_status()
[all …]
/DragonOS-0.1.8/kernel/src/driver/virtio/
Dvirtio_impl.rs33 core::ptr::write_bytes(virt.data() as *mut u8, 0, count.data() * MMArch::PAGE_SIZE); in dma_alloc()
44 paddr.data(), in dma_alloc()
45 NonNull::new(MMArch::phys_2_virt(paddr).unwrap().data() as _).unwrap(), in dma_alloc()
91 return MMArch::virt_2_phys(vaddr).unwrap().data(); in share()
/DragonOS-0.1.8/kernel/src/filesystem/vfs/
Dmount.rs126 fn open(&self, data: &mut FilePrivateData, mode: &FileMode) -> Result<(), SystemError> { in open()
127 return self.inner_inode.open(data, mode); in open()
130 fn close(&self, data: &mut FilePrivateData) -> Result<(), SystemError> { in close()
131 return self.inner_inode.close(data); in close()
139 data: usize, in create_with_data()
143 .create_with_data(name, file_type, mode, data); in create_with_data()
155 data: &mut FilePrivateData, in read_at()
157 return self.inner_inode.read_at(offset, len, buf, data); in read_at()
165 data: &mut FilePrivateData, in write_at()
167 return self.inner_inode.write_at(offset, len, buf, data); in write_at()
[all …]
/DragonOS-0.1.8/docs/kernel/process_management/
Dkthread.md23 &emsp;&emsp;`kthread_create(thread_fn, data, name_fmt, arg...)`
37 **data**
57 &emsp;&emsp;`kthread_run(thread_fn, data, name_fmt, ...)`
69 &emsp;&emsp;`kthread_run_rt(thread_fn, data, name_fmt, ...)`
/DragonOS-0.1.8/docs/kernel/boot/
Dmultiboot2.md23 void *data, unsigned int *count)
32 **data**
38 &emsp;&emsp;当返回的**data**为一个列表时,通过该值来指示列表中有多少项。
/DragonOS-0.1.8/kernel/src/ipc/
Dpipe.rs32 data: [u8; PIPE_BUFF_SIZE], field
46 data: [0; PIPE_BUFF_SIZE], in new()
118 buf[0..(PIPE_BUFF_SIZE - start)].copy_from_slice(&inode.data[start..PIPE_BUFF_SIZE]); in read_at()
119 buf[(PIPE_BUFF_SIZE - start)..num].copy_from_slice(&inode.data[0..end]); in read_at()
121 buf[0..num].copy_from_slice(&inode.data[start..end]); in read_at()
145 metadata.size = inode.data.len() as i64; in metadata()
190 inode.data[start..PIPE_BUFF_SIZE].copy_from_slice(&buf[0..(PIPE_BUFF_SIZE - start)]); in write_at()
191 inode.data[0..end].copy_from_slice(&buf[(PIPE_BUFF_SIZE - start)..len]); in write_at()
193 inode.data[start..end].copy_from_slice(&buf[0..len]); in write_at()

1234