Changeset 95 for trunk/hal/generic/hal_uspace.h
- Timestamp:
- Jun 29, 2017, 1:40:15 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/generic/hal_uspace.h
r23 r95 31 31 // 32 32 // When moving data between user space and kernel space, the user address is always 33 // a virtual address, but the kernel address can be a physical address, on some 34 // architectures. For sake of portability, data transfers must use the following API. 33 // a virtual address, but the kernel address can be a physical address, on 32 bits 34 // architectures, and require MMU dynamic activation/deactivation. 35 // For sake of portability, user/kernel data transfers must use the following API. 35 36 ////////////////////////////////////////////////////////////////////////////////////////// 36 37 … … 61 62 62 63 /***************************************************************************************** 64 * This function tranfers a NUL terminated string from the user space to the kernel space. 65 * If the kernel uses physical addresses, it activates the MMU to access the user buffer. 66 ***************************************************************************************** 67 * @ u_dst : destination buffer address in user space. 68 * @ k_src : source address in kernel space. 69 ****************************************************************************************/ 70 extern void hal_strcpy_from_uspace( char * k_dst, 71 char * u_src ); 72 73 /***************************************************************************************** 74 * This function tranfers a NUL terminated string from the kernel space to the user space. 75 * If the kernel uses physical addresses, it activates the MMU to access the user buffer. 76 ***************************************************************************************** 77 * @ u_dst : destination buffer address in user space. 78 * @ k_src : source address in kernel space. 79 ****************************************************************************************/ 80 extern void hal_strcpy_to_uspace( char * u_dst, 81 char * k_src ); 82 83 /***************************************************************************************** 63 84 * This function computes the length of a string in user space. 64 85 * If the kernel uses physical addresses, it activates the MMU to access the user buffer. … … 67 88 * @ return length of the string. 68 89 ****************************************************************************************/ 69 uint32_t hal_strlen_from_uspace( char 90 uint32_t hal_strlen_from_uspace( char * string ); 70 91 71 92
Note: See TracChangeset
for help on using the changeset viewer.