Home
last modified time | relevance | path

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

123

/DragonOS-0.1.7/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.rs34 data: UnsafeCell<T>, field
40 data: *const T, field
49 data: *const T, field
57 data: *mut T, field
68 pub const fn new(data: T) -> Self { in new()
71 data: UnsafeCell::new(data), in new()
79 let RwLock { data, .. } = self; in into_inner()
80 return data.into_inner(); in into_inner()
88 return self.data.get(); in as_mut_ptr()
130 data: unsafe { &*self.data.get() }, in 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 …]
Dmutex.rs32 data: UnsafeCell<T>, field
50 data: UnsafeCell::new(value), in new()
154 return unsafe { &*self.lock.data.get() }; in deref()
161 return unsafe { &mut *self.lock.data.get() }; in deref_mut()
/DragonOS-0.1.7/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.7/kernel/src/driver/multiboot2/
Dmultiboot2.c22 void *data, unsigned int *count) in multiboot2_iter() argument
32 if (_fun(tag, data, count) == true) in multiboot2_iter()
58 bool multiboot2_get_memory(const struct iter_data_t *_iter_data, void *data, unsigned int *count) in multiboot2_get_memory() argument
63 struct multiboot_mmap_entry_t *resource = (struct multiboot_mmap_entry_t *)data; in multiboot2_get_memory()
83 bool multiboot2_get_VBE_info(const struct iter_data_t *_iter_data, void *data, unsigned int *reserv… in multiboot2_get_VBE_info() argument
88 *(struct multiboot_tag_vbe_t *)data = *(struct multiboot_tag_vbe_t *)_iter_data; in multiboot2_get_VBE_info()
98 bool multiboot2_get_Framebuffer_info(const struct iter_data_t *_iter_data, void *data, unsigned int… in multiboot2_get_Framebuffer_info() argument
102 …*(struct multiboot_tag_framebuffer_info_t *)data = *(struct multiboot_tag_framebuffer_info_t *)_it… in multiboot2_get_Framebuffer_info()
114 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
119 *(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.7/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__); …
Dcompletion.h45 int __test_completion_waiter(void *data); // 等待者
46 int __test_completion_worker(void *data); // 执行者
/DragonOS-0.1.7/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.7/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.7/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()
55 let head = NonNull::new(data as *mut acpi_system_description_table_header_t).unwrap(); in ecam_root()
/DragonOS-0.1.7/user/apps/about/
Dabout.lds23 .data :
26 *(.data) argument
27 *(.data.*)
/DragonOS-0.1.7/user/apps/test_signal/
Dlink.lds23 .data :
26 *(.data) argument
27 *(.data.*)
/DragonOS-0.1.7/user/apps/shell/
Dshell.lds23 .data :
26 *(.data) argument
27 *(.data.*)
/DragonOS-0.1.7/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.7/kernel/src/filesystem/procfs/
Dmod.rs76 data: Vec<u8>, field
81 return ProcfsFilePrivateData { data: Vec::new() }; in new()
95 data: Vec<u8>, field
108 fn trim_string(&self, data: &mut Vec<u8>) { in trim_string()
109 data.drain_filter(|x: &mut u8| *x == 0); in trim_string()
110 data.push(0); in trim_string()
130 let pdata: &mut Vec<u8> = &mut pdata.data; in open_status()
177 let data: u64 = unsafe { *pcb.mm }.data_addr_end - unsafe { *pcb.mm }.data_addr_start; in open_status() localVariable
184 pdata.append(&mut format!("\nVmData:\t{} kB", data).as_bytes().to_owned()); in open_status()
201 let start = _pdata.data.len().min(offset); in read_status()
[all …]
/DragonOS-0.1.7/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.7/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.7/docs/kernel/boot/
Dmultiboot2.md23 void *data, unsigned int *count)
32 **data**
38 &emsp;&emsp;当返回的**data**为一个列表时,通过该值来指示列表中有多少项。
/DragonOS-0.1.7/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()
/DragonOS-0.1.7/kernel/src/filesystem/ramfs/
Dmod.rs49 data: Vec<u8>, field
82 data: Vec::new(), in new()
135 let start = inode.data.len().min(offset); in read_at()
136 let end = inode.data.len().min(offset + len); in read_at()
144 let src = &inode.data[start..end]; in read_at()
168 let data: &mut Vec<u8> = &mut inode.data; in write_at() localVariable
171 if offset + len > data.len() { in write_at()
172 data.resize(offset + len, 0); in write_at()
175 let target = &mut data[offset..offset + len]; in write_at()
203 metadata.size = inode.data.len() as i64; in metadata()
[all …]
/DragonOS-0.1.7/tools/
Dbuild_in_docker.sh3 docker run --rm --privileged=true --cap-add SYS_ADMIN --cap-add MKNOD -v $(pwd):/data -v /dev:/dev …
6 cd /data
/DragonOS-0.1.7/kernel/src/driver/tty/
Dtty_device.rs120 fn open(&self, data: &mut FilePrivateData, mode: &FileMode) -> Result<(), SystemError> { in open()
138 *data = FilePrivateData::Tty(p); in open()
147 data: &mut crate::filesystem::vfs::FilePrivateData, in read_at()
149 let _data: &mut TtyFilePrivateData = match self.verify_file_private_data(data) { in read_at()
181 data: &mut crate::filesystem::vfs::FilePrivateData, in write_at()
183 let data: &mut TtyFilePrivateData = match self.verify_file_private_data(data) { in write_at() localVariable
194 let r: Result<usize, TtyError> = if data.flags.contains(TtyFileFlag::STDOUT) { in write_at()
196 } else if data.flags.contains(TtyFileFlag::STDERR) { in write_at()
/DragonOS-0.1.7/docs/kernel/locking/
Dspinlock.md41 data: UnsafeCell<T>,
78 pub data: SpinLock<data_struct>,
86 pub data: data_struct,
/DragonOS-0.1.7/kernel/src/driver/video/
Dvideo.h33 void video_refresh_framebuffer(void *data);

123