Changeset fac0ac7 in mainline
- Timestamp:
- 2018-05-15T18:48:49Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7c3fb9b, 99013b84
- Parents:
- 47e00b83
- git-author:
- Jiří Zárevúcky <jiri.zarevucky@…> (2018-05-15 17:23:07)
- git-committer:
- Jiří Zárevúcky <jiri.zarevucky@…> (2018-05-15 18:48:49)
- Location:
- kernel
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/abs32le/src/abs32le.c
r47e00b83 rfac0ac7 126 126 } 127 127 128 errno_t memcpy_from_uspace(void *dst, const void *uspace_src, size_t size)128 uintptr_t memcpy_from_uspace(void *dst, const void *uspace_src, size_t size) 129 129 { 130 return EOK;130 return 0; 131 131 } 132 132 133 errno_t memcpy_to_uspace(void *uspace_dst, const void *src, size_t size)133 uintptr_t memcpy_to_uspace(void *uspace_dst, const void *src, size_t size) 134 134 { 135 return EOK;135 return 0; 136 136 } 137 137 -
kernel/arch/riscv64/src/riscv64.c
r47e00b83 rfac0ac7 143 143 } 144 144 145 errno_t memcpy_from_uspace(void *dst, const void *uspace_src, size_t size)145 uintptr_t memcpy_from_uspace(void *dst, const void *uspace_src, size_t size) 146 146 { 147 return EOK;147 return 0; 148 148 } 149 149 150 errno_t memcpy_to_uspace(void *uspace_dst, const void *src, size_t size)150 uintptr_t memcpy_to_uspace(void *uspace_dst, const void *src, size_t size) 151 151 { 152 return EOK;152 return 0; 153 153 } 154 154 -
kernel/generic/include/syscall/copy.h
r47e00b83 rfac0ac7 49 49 /* 50 50 * This interface must be implemented by each architecture. 51 * The functions return zero on failure and nonzero on success. 51 52 */ 52 extern errno_t memcpy_from_uspace(void *dst, const void *uspace_src, size_t size);53 extern errno_t memcpy_to_uspace(void *uspace_dst, const void *src, size_t size);53 extern uintptr_t memcpy_from_uspace(void *dst, const void *uspace_src, size_t size); 54 extern uintptr_t memcpy_to_uspace(void *uspace_dst, const void *src, size_t size); 54 55 55 56 #endif -
kernel/generic/src/syscall/copy.c
r47e00b83 rfac0ac7 90 90 THREAD->in_copy_from_uspace = true; 91 91 92 rc = memcpy_from_uspace(dst, uspace_src, size);92 rc = !memcpy_from_uspace(dst, uspace_src, size) ? EPERM : EOK; 93 93 94 94 THREAD->in_copy_from_uspace = false; 95 95 96 96 interrupts_restore(ipl); 97 return !rc ? EPERM : EOK;97 return rc; 98 98 } 99 99 … … 141 141 THREAD->in_copy_to_uspace = true; 142 142 143 rc = memcpy_to_uspace(uspace_dst, src, size);143 rc = !memcpy_to_uspace(uspace_dst, src, size) ? EPERM : EOK; 144 144 145 145 THREAD->in_copy_to_uspace = false; 146 146 147 147 interrupts_restore(ipl); 148 return !rc ? EPERM : 0;148 return rc; 149 149 } 150 150
Note:
See TracChangeset
for help on using the changeset viewer.