Home
last modified time | relevance | path

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

12

/DragonOS-0.1.5/kernel/src/libs/
Dvolatile_io.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 …]
Dvec_cursor.rs16 data: Vec<u8>, field
23 pub fn new(data: Vec<u8>) -> Self { in new()
24 return Self { data: data, pos: 0 }; in new()
30 data: Vec::new(), in zerod()
33 result.data.resize(length, 0); in zerod()
39 return &mut self.data; in get_mut()
44 return &self.data; in get_ref()
49 if self.pos >= self.data.len() { in read_u8()
53 return Ok(self.data[self.pos - 1]); in read_u8()
58 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 …]
Dmutex.rs31 data: UnsafeCell<T>, field
49 data: UnsafeCell::new(value), in new()
153 return unsafe { &*self.lock.data.get() }; in deref()
160 return unsafe { &mut *self.lock.data.get() }; in deref_mut()
Dspinlock.rs148 data: UnsafeCell<T>, field
167 data: UnsafeCell::new(value), in new()
184 return unsafe { &*self.lock.data.get() }; in deref()
191 return unsafe { &mut *self.lock.data.get() }; in deref_mut()
/DragonOS-0.1.5/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.5/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.5/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.5/kernel/src/time/
Dtimer.h19 void do_timer_softirq(void *data);
29 void (*func)(void *data);
30 void *data; member
42 void timer_func_init(struct timer_func_list_t *timer_func, void (*func)(void *data), void *data, ui…
52 void timer_func_init_us(struct timer_func_list_t *timer_func, void (*func)(void *data), void *data,…
Dtimer.c40 void do_timer_softirq(void *data) in do_timer_softirq() argument
50 tmp->func(tmp->data); in do_timer_softirq()
75 void timer_func_init(struct timer_func_list_t *timer_func, void (*func)(void *data), void *data, ui… in timer_func_init() argument
79 timer_func->data = data; in timer_func_init()
91 void timer_func_init_us(struct timer_func_list_t *timer_func, void (*func)(void *data), void *data,… in timer_func_init_us() argument
95 timer_func->data = data; in timer_func_init_us()
/DragonOS-0.1.5/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()
137 struct process_control_block *kthread_create_on_node(int (*thread_fn)(void *data), void *data, int … in kthread_create_on_node() argument
143 pcb = __kthread_create_on_node(thread_fn, data, node, name_fmt, args); in kthread_create_on_node()
157 int (*thread_fn)(void *data) = create->thread_fn; in kthread()
158 void *data = create->data; in kthread() local
165 self->data = data; in kthread()
186 retval = thread_fn(data); in kthread()
/DragonOS-0.1.5/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.5/user/apps/shell/
Dshell.lds23 .data :
26 *(.data) argument
27 *(.data.*)
/DragonOS-0.1.5/user/apps/test_signal/
Dlink.lds23 .data :
26 *(.data) argument
27 *(.data.*)
/DragonOS-0.1.5/user/apps/about/
Dabout.lds23 .data :
26 *(.data) argument
27 *(.data.*)
/DragonOS-0.1.5/kernel/src/exception/
Dsoftirq.rs27 pub action: Option<unsafe extern "C" fn(data: *mut ::core::ffi::c_void)>, //软中断处理函数
28 pub data: *mut c_void, field
35 data: null_mut(), in default()
83 action: Option<unsafe extern "C" fn(data: *mut ::core::ffi::c_void)>, in register_softirq()
84 data: *mut c_void, in register_softirq()
87 softirq_handler.register_softirq(irq_num, action, data); in register_softirq()
191 action: Option<unsafe extern "C" fn(data: *mut ::core::ffi::c_void)>, in register_softirq()
192 data: *mut c_void, in register_softirq()
203 self.table[irq_num as usize].data = data; in register_softirq()
230 self.table[irq_num as usize].data = null_mut(); in unregister_softirq()
[all …]
Dsoftirq.h18 extern int register_softirq(uint32_t irq_num, void (*action)(void *data), void *data);
/DragonOS-0.1.5/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.5/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()
178 let data: u64 = unsafe { *pcb.mm }.data_addr_end - unsafe { *pcb.mm }.data_addr_start; in open_status() localVariable
185 pdata.append(&mut format!("\nVmData:\t{} kB", data).as_bytes().to_owned()); in open_status()
202 let start = _pdata.data.len().min(offset); in read_status()
[all …]
/DragonOS-0.1.5/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.5/docs/kernel/boot/
Dmultiboot2.md23 void *data, unsigned int *count)
32 **data**
38 &emsp;&emsp;当返回的**data**为一个列表时,通过该值来指示列表中有多少项。
/DragonOS-0.1.5/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.5/kernel/src/filesystem/ramfs/
Dmod.rs51 data: Vec<u8>, field
84 data: Vec::new(), in new()
137 let start = inode.data.len().min(offset); in read_at()
138 let end = inode.data.len().min(offset + len); in read_at()
146 let src = &inode.data[start..end]; in read_at()
170 let data: &mut Vec<u8> = &mut inode.data; in write_at() localVariable
173 if offset + len > data.len() { in write_at()
174 data.resize(offset + len, 0); in write_at()
177 let target = &mut data[offset..offset + len]; in write_at()
207 metadata.size = inode.data.len() as i64; in metadata()
[all …]
/DragonOS-0.1.5/kernel/src/filesystem/vfs/
Dmount.rs129 fn open(&self, data: &mut FilePrivateData) -> Result<(), i32> { in open()
130 return self.inner_inode.open(data); in open()
133 fn close(&self, data: &mut FilePrivateData) -> Result<(), i32> { in close()
134 return self.inner_inode.close(data); in close()
142 data: usize, in create_with_data()
146 .create_with_data(name, file_type, mode, data); in create_with_data()
158 data: &mut FilePrivateData, in read_at()
160 return self.inner_inode.read_at(offset, len, buf, data); in read_at()
316 fn ioctl(&self, cmd: u32, data: usize) -> Result<usize, i32> { in ioctl()
317 return self.inner_inode.ioctl(cmd, data); in ioctl()

12