Home
last modified time | relevance | path

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

12

/DragonOS/kernel/src/libs/
H A Dstring.c11 char *strcpy(char *dst, const char *src) in strcpy() argument
13 while (*src) in strcpy()
15 *(dst++) = *(src++); in strcpy()
22 long strnlen(const char *src, unsigned long maxlen) in strnlen() argument
25 if (src == NULL) in strnlen()
28 while (src[__res] != '\0' && __res < maxlen) in strnlen()
64 long strncpy_from_user(char *dst, const char *src, unsigned long size) in strncpy_from_user() argument
66 if (!verify_area((uint64_t)src, size)) in strncpy_from_user()
69 strncpy(dst, src, size); in strncpy_from_user()
79 long strnlen_user(const char *src, unsigned long maxlen) in strnlen_user() argument
[all …]
H A Dglib.c13 void *c_memmove(void *dst, const void *src, uint64_t size) in c_memmove() argument
15 const char *_src = src; in c_memmove()
22 if (dst <= src) in c_memmove()
23 return memcpy(dst, src, size); in c_memmove()
H A Dunistd.c5 void swab(void *restrict src, void *restrict dest, ssize_t nbytes) in swab() argument
8 char *_src = src; in swab()
/DragonOS/kernel/src/common/
H A Dcompiler.h49 static __always_inline void __read_once_size(void *dst, const volatile void *src, int size) in __read_once_size() argument
54 *(__u8_alias_t *)dst = *(volatile __u8_alias_t *)src; in __read_once_size()
57 *(__u16_alias_t *)dst = *(volatile __u16_alias_t *)src; in __read_once_size()
60 *(__u32_alias_t *)dst = *(volatile __u32_alias_t *)src; in __read_once_size()
63 *(__u64_alias_t *)dst = *(volatile __u64_alias_t *)src; in __read_once_size()
67 __builtin_memcpy((void *)dst, (const void *)src, size); in __read_once_size()
80 static __always_inline void __write_once_size(volatile void *dst, void *src, int size) in __write_once_size() argument
85 *(volatile __u8_alias_t *)dst = *(__u8_alias_t *)src; in __write_once_size()
88 *(volatile __u16_alias_t *)dst = *(__u16_alias_t *)src; in __write_once_size()
91 *(volatile __u32_alias_t *)dst = *(__u32_alias_t *)src; in __write_once_size()
[all …]
H A Dstring.h10 char *strcpy(char *dst, const char *src);
32 long strnlen(const char *src, unsigned long maxlen);
45 long strncpy_from_user(char *dst, const char *src, unsigned long size);
53 long strnlen_user(const char *src, unsigned long maxlen);
62 char *strcat(char *dest, const char *src);
H A Dunistd.h22 void swab(void *restrict src, void *restrict dest, ssize_t nbytes);
/DragonOS/
H A Dtriagebot.toml67 trigger_files = ["kernel/src/filesystem"]
70 trigger_files = ["kernel/src/arch/x86_64"]
73 trigger_files = ["kernel/src/arch/riscv64"]
77 "kernel/src/driver",
78 "kernel/src/arch/x86_64/driver",
79 "kernel/src/arch/riscv64/driver",
83 trigger_files = ["kernel/src/virt", "kernel/src/arch/x86_64/kvm"]
102 [mentions."kernel/src/driver/base"]
106 [mentions."kernel/src/driver/tty"]
142 "/kernel/src/driver" = ["main"]
[all …]
H A DREADME.md2 <img width="40%" src="docs/_static/dragonos-logo.svg" alt="dragonos-logo"></br>
5 <a href="https://dragonos.org"><img alt="官网" src="https://img.shields.io/badge/%E5%AE%98%E7%BD%91-D…
6 <a href="https://bbs.dragonos.org.cn"><img alt="bbs" src="https://img.shields.io/badge/BBS-bbs.drag…
/DragonOS/kernel/src/syscall/
H A Duser_access.rs38 pub unsafe fn copy_to_user(dest: VirtAddr, src: &[u8]) -> Result<usize, SystemError> { in copy_to_user()
39 verify_area(dest, src.len()).map_err(|_| SystemError::EFAULT)?; in copy_to_user()
43 p.copy_from_nonoverlapping(src.as_ptr(), src.len()); in copy_to_user()
44 return Ok(src.len()); in copy_to_user()
48 pub unsafe fn copy_from_user(dst: &mut [u8], src: VirtAddr) -> Result<usize, SystemError> { in copy_from_user()
49 verify_area(src, dst.len()).map_err(|_| SystemError::EFAULT)?; in copy_from_user()
51 let src: &[u8] = core::slice::from_raw_parts(src.data() as *const u8, dst.len()); in copy_from_user() localVariable
53 dst.copy_from_slice(src); in copy_from_user()
241 fn convert_with_offset<T>(&self, src: &[u8], offset: usize) -> Result<&[T], SystemError> { in convert_with_offset()
242 if offset >= src.len() { in convert_with_offset()
[all …]
/DragonOS/user/apps/user-manage/
H A DCargo.toml8 path = "src/cmd/useradd.rs"
12 path = "src/cmd/userdel.rs"
16 path = "src/cmd/usermod.rs"
20 path = "src/cmd/passwd.rs"
24 path = "src/cmd/groupadd.rs"
28 path = "src/cmd/groupdel.rs"
32 path = "src/cmd/groupmod.rs"
/DragonOS/docs/kernel/configuration/
H A Dconfig.md14 path = "src/init/"
20 path = "src/mm/"
35 **src/mm/d.config**
44 path = "src/mm/allocator/"
69 **src/mm/allocator/d.config**
82 **src/init/d.config**
/DragonOS/kernel/
H A D.gitignore2 src/kernel
7 src/include/bindings/bindings.rs
9 src/include/bindings/bindings.h
H A DMakefile19 $(MAKE) -C src all ARCH=$(ARCH) || (sh -c "echo 内核编译失败" && exit 1)
24 $(MAKE) -C src clean ARCH=$(ARCH)
39 …ly-2024-07-23 check --workspace $(CARGO_ZBUILD) --message-format=json --target ./src/$(TARGET_JSON)
H A Drust-toolchain.toml3 components = ["rust-src", "clippy"]
/DragonOS/kernel/src/smp/
H A Dsyscall.rs11 let src = unsafe { cpu_manager.possible_cpus().inner().as_bytes() }; in getaffinity() localVariable
12 set[0..src.len()].copy_from_slice(src); in getaffinity()
/DragonOS/docs/kernel/core_api/
H A Dkernel_api.md455 **src**
459 #### `long strnlen(const char *src, unsigned long maxlen)`
467 **src**
475 #### `long strnlen_user(const char *src, unsigned long maxlen)`
481 &emsp;&emsp;该函数会进行地址空间校验,要求src字符串必须来自用户空间。当源字符串来自内核空间时,将返回0.
485 **src**
493 #### `char *strncpy(char *dst, const char *src, long count)`
501 **src**
513 #### `char *strcpy(char *dst, const char *src)` argument
521 **src**
[all …]
H A Dcasting.md8 &emsp;&emsp;上述没有特殊标明的函数,都是在`kernel/src/libs/casting.rs`中实现的。
16 SystemError枚举类型使用了这种方式,您可以在`kernel/src/syscall/mod.rs`中找到它的用法。
44 …>`转换为`Arc<T>`的具体类型指针时,我们要为`U`这个trait实现`DowncastArc`trait。这个trait定义在`kernel/src/libs/casting.rs`中。它…
/DragonOS/kernel/src/arch/x86_64/include/asm/
H A Dasm.h184 static void *memcpy(void *dst, const void *src, long Num) in memcpy() argument
201 : "0"(Num / 8), "q"(Num), "1"(dst), "2"(src) in memcpy()
274 static inline uint64_t copy_from_user(void *dst, void *src, uint64_t size) in copy_from_user() argument
277 if (!verify_area((uint64_t)src, size)) in copy_from_user()
290 : "r"(size & 7), "0"(size >> 3), "1"(dst), "2"(src) in copy_from_user()
303 static inline uint64_t copy_to_user(void *dst, void *src, uint64_t size) in copy_to_user() argument
305 if (verify_area((uint64_t)src, size)) in copy_to_user()
321 memcpy(dst, src, size); in copy_to_user()
/DragonOS/kernel/src/driver/video/fbdev/base/
H A Drender_helper.rs8 src: Iter<'a, u8>, field
26 src: Iter<'a, u8>, in new()
41 src, in new()
51 ans.current = *ans.src.next().unwrap(); in new()
74 self.current = match self.src.next() { in move_mask()
H A Dmod.rs166 let mut src; in fast_imageblit() localVariable
172 src = offset; in fast_imageblit()
178 *dst = color_tab[(image.data[src] as usize >> 4) & bitmask]; in fast_imageblit()
180 *dst = color_tab[(image.data[src] as usize) & bitmask]; in fast_imageblit()
183 src += 1; in fast_imageblit()
190 *dst = color_tab[(image.data[src] as usize >> 6) & bitmask]; in fast_imageblit()
192 *dst = color_tab[(image.data[src] as usize >> 4) & bitmask]; in fast_imageblit()
194 *dst = color_tab[(image.data[src] as usize >> 2) & bitmask]; in fast_imageblit()
196 *dst = color_tab[(image.data[src] as usize) & bitmask]; in fast_imageblit()
198 src += 1; in fast_imageblit()
[all …]
/DragonOS/kernel/src/driver/video/fbdev/
H A Dvesafb.rs532 let src = in fb_copyarea() localVariable
544 let mut src = src.as_ptr::<u32>(); in fb_copyarea() localVariable
551 core::ptr::copy(src, dst, visiable_w as usize); in fb_copyarea()
552 src = src.add(line_offset); in fb_copyarea()
563 core::ptr::copy(src, tmp_ptr, visiable_w as usize); in fb_copyarea()
564 src = src.add(line_offset); in fb_copyarea()
579 let mut src = src.as_ptr::<u16>(); in fb_copyarea() localVariable
586 core::ptr::copy(src, dst, visiable_w as usize); in fb_copyarea()
587 src = src.add(line_offset); in fb_copyarea()
598 core::ptr::copy(src, tmp_ptr, visiable_w as usize); in fb_copyarea()
[all …]
/DragonOS/kernel/src/filesystem/procfs/
H A Dkmsg.rs74 let src = &self.data[0..len]; in read_all() localVariable
75 buf[0..len].copy_from_slice(src); in read_all()
93 let src = &data_level[0..len]; in read_level() localVariable
94 buf[0..len].copy_from_slice(src); in read_level()
/DragonOS/.github/workflows/
H A Dcache-toolchain.yml56 rustup component add rust-src --toolchain nightly-2024-07-23-x86_64-unknown-linux-gnu
57 rustup component add rust-src --toolchain nightly-2023-08-15-x86_64-unknown-linux-gnu
68 rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu
69 rustup component add rust-src
87 rustup component add --toolchain ${userapp_musl_toolchain} rust-src
91 rustup component add rust-src --toolchain nightly-2024-07-23-x86_64-unknown-linux-gnu
/DragonOS/docs/community/code_contribution/
H A Dconventional-commit.md10 …: 如无特殊说明,以子模块/系统/目录名作为范围,例如代码变动是发生在`kernel/src/driver/net`中的特性追加,那么应当命名为`feat(driver/net):`,如果是发生在…
/DragonOS/docs/kernel/debug/
H A Ddebug-kernel-with-gdb.md145 …8f16: file /home/heyicong/.cargo/registry/src/mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd/thingb…
151 …at /home/heyicong/.cargo/registry/src/mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd/thingbuf-0.1.4…
294 …at /home/heyicong/.cargo/registry/src/mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd/thingbuf-0.1.4…

12