/DragonOS-0.1.8/kernel/src/libs/ |
D | string.c | 11 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() 65 char *strncpy(char *dst, const char *src, long count) in strncpy() argument 79 : "S"(src), "D"(dst), "c"(count) in strncpy() 84 long strncpy_from_user(char *dst, const char *src, unsigned long size) in strncpy_from_user() argument 86 if (!verify_area((uint64_t)src, size)) in strncpy_from_user() [all …]
|
D | ffi_convert.rs | 4 fn convert_ref(src: *const T) -> Option<&'static Self>; in convert_ref() 6 fn convert_mut(src: *mut T) -> Option<&'static mut Self>; in convert_mut() 9 pub fn __convert_mut<'a, S, D>(src: *mut S) -> Option<&'a mut D> { in __convert_mut() 10 return unsafe { core::mem::transmute::<*mut S, *mut D>(src).as_mut() }; in __convert_mut() 13 pub fn __convert_ref<'a, S, D>(src: *const S) -> Option<&'a D> { in __convert_ref() 14 return unsafe { core::mem::transmute::<*const S, *const D>(src).as_ref() }; in __convert_ref()
|
D | glib.c | 38 void *memmove(void *dst, const void *src, uint64_t size) in memmove() argument 40 const char *_src = src; in memmove() 47 if (dst <= src) in memmove() 48 return memcpy(dst, src, size); in memmove()
|
D | refcount.rs | 27 src: *mut crate::include::bindings::bindings::refcount_struct, in convert_mut() 29 return __convert_mut(src); in convert_mut() 32 src: *const crate::include::bindings::bindings::refcount_struct, in convert_ref() 34 return __convert_ref(src); in convert_ref()
|
D | unistd.c | 24 void swab(void *restrict src, void *restrict dest, ssize_t nbytes) in swab() argument 27 char *_src = src; in swab()
|
/DragonOS-0.1.8/kernel/src/common/ |
D | compiler.h | 49 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 …]
|
D | string.h | 10 char *strcpy(char *dst, const char *src); 32 long strnlen(const char *src, unsigned long maxlen); 43 char *strncpy(char *dst, const char *src, long count); 45 long strncpy_from_user(char *dst, const char *src, unsigned long size); 53 long strnlen_user(const char *src, unsigned long maxlen); 87 char *strcat(char *dest, const char *src);
|
D | lz4.h | 146 LZ4LIB_API int LZ4_compress_default(const char *src, char *dst, int srcSize, int dstCapacity); 162 …LZ4LIB_API int LZ4_decompress_safe(const char *src, char *dst, int compressedSize, int dstCapacity… 189 …LZ4LIB_API int LZ4_compress_fast(const char *src, char *dst, int srcSize, int dstCapacity, int acc… 198 …LZ4LIB_API int LZ4_compress_fast_extState(void *state, const char *src, char *dst, int srcSize, in… 223 …LZ4LIB_API int LZ4_compress_destSize(const char *src, char *dst, int *srcSizePtr, int targetDstSiz… 259 …LZ4LIB_API int LZ4_decompress_safe_partial(const char *src, char *dst, int srcSize, int targetOutp… 329 …LZ4LIB_API int LZ4_compress_fast_continue(LZ4_stream_t *streamPtr, const char *src, char *dst, int… 401 …decompress_safe_continue(LZ4_streamDecode_t *LZ4_streamDecode, const char *src, char *dst, int src… 411 …LZ4LIB_API int LZ4_decompress_safe_usingDict(const char *src, char *dst, int srcSize, int dstCapci… 460 …LZ4LIB_STATIC_API int LZ4_compress_fast_extState_fastReset(void *state, const char *src, char *dst… [all …]
|
D | glib.h | 110 static void *memcpy(void *dst, const void *src, long Num) in memcpy() argument 127 : "0"(Num / 8), "q"(Num), "1"(dst), "2"(src) in memcpy() 217 static inline uint64_t copy_from_user(void *dst, void *src, uint64_t size) in copy_from_user() argument 220 if (!verify_area((uint64_t)src, size)) in copy_from_user() 233 : "r"(size & 7), "0"(size >> 3), "1"(dst), "2"(src) in copy_from_user() 246 static inline uint64_t copy_to_user(void *dst, void *src, uint64_t size) in copy_to_user() argument 249 if (verify_area((uint64_t)src, size)) in copy_to_user() 265 memcpy(dst,src,size); in copy_to_user() 347 void *memmove(void *dst, const void *src, uint64_t size);
|
D | unistd.h | 36 void swab(void *restrict src, void *restrict dest, ssize_t nbytes);
|
/DragonOS-0.1.8/user/libs/libc/src/ |
D | string.c | 68 char *strncpy(char *dst, const char *src, size_t Count) in strncpy() argument 82 : "S"(src), "D"(dst), "c"(Count) in strncpy() 94 char *strcat(char *dest, const char *src) in strcat() argument 96 strcpy(dest + strlen(dest), src); in strcat() 107 char *strcpy(char *dst, const char *src) in strcpy() argument 109 while (*src) in strcpy() 111 *(dst++) = *(src++); in strcpy()
|
/DragonOS-0.1.8/user/libs/libc/src/include/export/ |
D | string.h | 35 char *strncpy(char *dst, const char *src, size_t Count); 44 char* strcpy(char* dst, const char* src); 53 char *strcat(char *dest, const char *src); 63 static void *memcpy(void *dst, const void *src, long Num) in memcpy() argument 80 : "0"(Num / 8), "q"(Num), "1"(dst), "2"(src) in memcpy()
|
/DragonOS-0.1.8/docs/userland/libc/apis/api-list/ |
D | string.md | 13 ``char* strncpy(char *dst,const char *src,size_t count)`` 19 src: 原字符串 23 ``char* strcpy(char *dst,const char *src)`` : 复制整个字符串 25 ``char* strcat(char *dest,const char* src)`` : 拼接两个字符串
|
/DragonOS-0.1.8/kernel/src/syscall/ |
D | user_access.rs | 33 pub unsafe fn copy_to_user(dest: VirtAddr, src: &[u8]) -> Result<usize, SystemError> { in copy_to_user() 34 verify_area(dest, src.len()).map_err(|_| SystemError::EFAULT)?; in copy_to_user() 38 p.copy_from_nonoverlapping(src.as_ptr(), src.len()); in copy_to_user() 39 return Ok(src.len()); in copy_to_user() 43 pub unsafe fn copy_from_user(dst: &mut [u8], src: VirtAddr) -> Result<usize, SystemError> { in copy_from_user() 44 verify_area(src, dst.len()).map_err(|_| SystemError::EFAULT)?; in copy_from_user() 46 let src: &[u8] = core::slice::from_raw_parts(src.data() as *const u8, dst.len()); in copy_from_user() localVariable 48 dst.copy_from_slice(&src); in copy_from_user()
|
/DragonOS-0.1.8/kernel/ |
D | .gitignore | 2 src/kernel 6 src/include/bindings/bindings.rs 8 src/include/bindings/bindings.h
|
D | Makefile | 4 $(MAKE) -C src all 9 $(MAKE) -C src clean
|
D | rust-toolchain.toml | 3 components = ["rust-src"]
|
/DragonOS-0.1.8/kernel/src/ipc/ |
D | signal_types.rs | 377 src: *mut crate::include::bindings::bindings::signal_struct, in convert_mut() 379 return __convert_mut(src); in convert_mut() 382 src: *const crate::include::bindings::bindings::signal_struct, in convert_ref() 384 return __convert_ref(src); in convert_ref() 393 src: *mut crate::include::bindings::bindings::siginfo, in convert_mut() 395 return __convert_mut(src); in convert_mut() 398 src: *const crate::include::bindings::bindings::siginfo, in convert_ref() 400 return __convert_ref(src); in convert_ref() 409 src: *mut crate::include::bindings::bindings::sigset_t, in convert_mut() 411 return __convert_mut(src); in convert_mut() [all …]
|
/DragonOS-0.1.8/user/libs/libc/ |
D | Makefile | 3 $(MAKE) CFLAGS="$(CFLAGS)" -C src all 7 $(MAKE) -C src clean
|
/DragonOS-0.1.8/docs/kernel/core_api/ |
D | kernel_api.md | 455 **src** 459 #### `long strnlen(const char *src, unsigned long maxlen)` 467 **src** 475 #### `long strnlen_user(const char *src, unsigned long maxlen)` 481   该函数会进行地址空间校验,要求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 …]
|
D | casting.md | 8   上述没有特殊标明的函数,都是在`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-0.1.8/docs/kernel/process_management/ |
D | pcb.md | 3 PCB的全称为process control block, 它是每个进程/线程的核心控制结构。定义于`kernel/src/process/proc-types.h`中。 15 该API提供了根据pid寻找pcb的功能,定义在`kernel/src/process/process.h`中。
|
/DragonOS-0.1.8/ |
D | rust-toolchain.toml | 3 components = ["rust-src"]
|
/DragonOS-0.1.8/user/ |
D | Makefile | 12 …_CFLAGS) -I $(shell pwd)/libs -I $(shell pwd)/libs/libc/src/include -I $(shell pwd)/libs/libc/src/… 60 …fig-dir dadk/config --cache-dir $(DADK_CACHE_DIR) --dragonos-dir $(ROOT_PATH)/bin/sysroot clean src 102 $(shell cp -r $(ROOT_PATH)/user/libs/libc/src/include/export/* $(OLD_LIBC_INSTALL_PATH)/include/) 103 $(shell cp -r $(ROOT_PATH)/user/libs/libc/src/arch/x86_64/c*.o $(OLD_LIBC_INSTALL_PATH)/lib/)
|
/DragonOS-0.1.8/kernel/.cargo/ |
D | config.toml | 2 target = "src/arch/x86_64/x86_64-unknown-none.json"
|