syscall: rename z_object_recycle -> k_object_recycle

Rename z_object_recycle and do not use z_ for internal APIs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2023-09-27 10:44:47 +00:00 committed by Carles Cufí
parent d178b6a0e7
commit 43a7402baf
4 changed files with 6 additions and 6 deletions

View file

@ -176,7 +176,7 @@ void z_object_uninit(const void *obj);
*
* @param object Address of the kernel object
*/
void z_object_recycle(const void *obj);
void k_object_recycle(const void *obj);
/**
* @brief Obtain the size of a C string passed from user mode

View file

@ -779,7 +779,7 @@ void k_object_init(const void *obj)
ko->flags |= K_OBJ_FLAG_INITIALIZED;
}
void z_object_recycle(const void *obj)
void k_object_recycle(const void *obj)
{
struct k_object *ko = z_object_find(obj);

View file

@ -263,7 +263,7 @@ void z_finalize_fd(int fd, void *obj, const struct fd_op_vtable *vtable)
* This call is a no-op if obj is invalid or points to something
* not a kernel object.
*/
z_object_recycle(obj);
k_object_recycle(obj);
#endif
fdtable[fd].obj = obj;
fdtable[fd].vtable = vtable;

View file

@ -861,7 +861,7 @@ static struct k_sem recycle_sem;
* @details Test recycle valid/invalid kernel object, see if
* perms_count changes as expected.
*
* @see z_object_recycle(), z_object_find()
* @see k_object_recycle(), z_object_find()
*
* @ingroup kernel_memprotect_tests
*/
@ -877,12 +877,12 @@ ZTEST(userspace, test_object_recycle)
ko = z_object_find(&dummy);
zassert_true(ko == NULL, "not an invalid object");
z_object_recycle(&dummy);
k_object_recycle(&dummy);
ko = z_object_find(&recycle_sem);
(void)memset(ko->perms, 0xFF, sizeof(ko->perms));
z_object_recycle(&recycle_sem);
k_object_recycle(&recycle_sem);
zassert_true(ko != NULL, "kernel object not found");
zassert_true(ko->flags & K_OBJ_FLAG_INITIALIZED,
"object wasn't marked as initialized");