syscall: rename z_user_string_nlen -> k_usermode_string_nlen

Rename internal API to not use z_/Z_.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2023-09-27 10:53:39 +00:00 committed by Carles Cufí
parent 3ab356604d
commit 70e791905d
3 changed files with 7 additions and 7 deletions

View file

@ -200,7 +200,7 @@ void k_object_recycle(const void *obj);
* maxlen if there were no NULL terminating characters within the
* first maxlen bytes.
*/
static inline size_t z_user_string_nlen(const char *src, size_t maxlen,
static inline size_t k_usermode_string_nlen(const char *src, size_t maxlen,
int *err)
{
return arch_user_string_nlen(src, maxlen, err);

View file

@ -858,7 +858,7 @@ char *z_user_string_alloc_copy(const char *src, size_t maxlen)
int err;
char *ret = NULL;
actual_len = z_user_string_nlen(src, maxlen, &err);
actual_len = k_usermode_string_nlen(src, maxlen, &err);
if (err != 0) {
goto out;
}
@ -890,7 +890,7 @@ int z_user_string_copy(char *dst, const char *src, size_t maxlen)
size_t actual_len;
int ret, err;
actual_len = z_user_string_nlen(src, maxlen, &err);
actual_len = k_usermode_string_nlen(src, maxlen, &err);
if (err != 0) {
ret = EFAULT;
goto out;

View file

@ -46,7 +46,7 @@ void k_sys_fatal_error_handler(unsigned int reason, const z_arch_esf_t *pEsf)
size_t z_impl_string_nlen(char *src, size_t maxlen, int *err)
{
return z_user_string_nlen(src, maxlen, err);
return k_usermode_string_nlen(src, maxlen, err);
}
static inline size_t z_vrfy_string_nlen(char *src, size_t maxlen, int *err)
@ -193,14 +193,14 @@ static inline uint32_t z_vrfy_more_args(uint32_t arg1, uint32_t arg2,
#include <syscalls/more_args_mrsh.c>
/**
* @brief Test to demonstrate usage of z_user_string_nlen()
* @brief Test to demonstrate usage of k_usermode_string_nlen()
*
* @details The test will be called from user mode and kernel
* mode to check the behavior of z_user_string_nlen()
* mode to check the behavior of k_usermode_string_nlen()
*
* @ingroup kernel_memprotect_tests
*
* @see z_user_string_nlen()
* @see k_usermode_string_nlen()
*/
ZTEST_USER(syscalls, test_string_nlen)
{