Changeset 299
- Timestamp:
- Jul 31, 2017, 2:19:12 PM (7 years ago)
- Location:
- trunk/hal
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/generic/hal_uspace.h
r121 r299 64 64 * This function tranfers a NUL terminated string from the user space to the kernel space. 65 65 * If the kernel uses physical addresses, it activates the MMU to access the user buffer. 66 * TODO : implement the max_size argument handling 66 * TODO : implement the max_size argument handling, and error handling 67 67 ***************************************************************************************** 68 68 * @ u_dst : destination buffer address in user space. … … 70 70 * @ max_size : max number of characters to be copied. 71 71 ****************************************************************************************/ 72 extern voidhal_strcpy_from_uspace( char * k_dst,73 char * u_src,74 uint32_t max_size );72 extern error_t hal_strcpy_from_uspace( char * k_dst, 73 char * u_src, 74 uint32_t max_size ); 75 75 76 76 /***************************************************************************************** 77 77 * This function tranfers a NUL terminated string from the kernel space to the user space. 78 78 * If the kernel uses physical addresses, it activates the MMU to access the user buffer. 79 * TODO : implement the max_size argument handling 79 * TODO : implement the max_size argument handling, and error handling 80 80 ***************************************************************************************** 81 81 * @ u_dst : destination buffer address in user space. … … 83 83 * @ max_size : max number of characters to be copied. 84 84 ****************************************************************************************/ 85 extern voidhal_strcpy_to_uspace( char * u_dst,86 char * k_src,87 uint32_t max_size );85 extern error_t hal_strcpy_to_uspace( char * u_dst, 86 char * k_src, 87 uint32_t max_size ); 88 88 89 89 /***************************************************************************************** -
trunk/hal/tsar_mips32/core/hal_uspace.c
r121 r299 128 128 129 129 ////////////////////////////////////////// 130 voidhal_strcpy_from_uspace( char * k_dst,131 char * u_src,132 uint32_t max_size )133 134 { 135 136 // TODO implement the max_size handling 130 error_t hal_strcpy_from_uspace( char * k_dst, 131 char * u_src, 132 uint32_t max_size ) 133 134 { 135 136 // TODO implement the max_size handling, and error handling 137 137 138 138 uint32_t save_sr; … … 159 159 hal_restore_irq( save_sr ); 160 160 161 return 0; 161 162 } // hal_strcpy_from_uspace() 162 163 163 164 //////////////////////////////////////////// 164 voidhal_strcpy_to_uspace( char * u_dst,165 char * k_src,166 uint32_t max_size )167 { 168 169 // TODO implement the max_size handling 165 error_t hal_strcpy_to_uspace( char * u_dst, 166 char * k_src, 167 uint32_t max_size ) 168 { 169 170 // TODO implement the max_size handling, and error handling 170 171 171 172 uint32_t save_sr; … … 192 193 hal_restore_irq( save_sr ); 193 194 194 } // hal_strcpy_from_uspace() 195 return 0; 196 } // hal_strcpy_to_uspace() 195 197 196 198 /////////////////////////////////////////////// -
trunk/hal/x86_64/core/hal_uspace.c
r189 r299 29 29 #include <hal_internal.h> 30 30 31 void hal_copy_from_uspace( void * k_dst, 32 void * u_src, 33 uint32_t size ) 31 void hal_copy_from_uspace(void *k_dst, void *u_src, uint32_t size) 34 32 { 35 33 x86_panic((char *)__func__); 36 34 } 37 35 38 void hal_copy_to_uspace( void * u_dst, 39 void * k_src, 40 uint32_t size ) 36 void hal_copy_to_uspace(void *u_dst, void *k_src, uint32_t size) 41 37 { 42 38 x86_panic((char *)__func__); … … 49 45 } 50 46 51 void hal_strcpy_from_uspace( char * k_dst, 52 char * u_src, 53 uint32_t max_size ) 47 error_t hal_strcpy_to_uspace(char *u_dst, char *k_src, uint32_t max_size) 54 48 { 55 49 x86_panic((char *)__func__); 50 return 0; 56 51 } 57 52 53 error_t hal_strcpy_from_uspace(char *k_dst, char *u_src, uint32_t max_size) 54 { 55 x86_panic((char *)__func__); 56 return 0; 57 } 58
Note: See TracChangeset
for help on using the changeset viewer.