Zephyr API Documentation 4.0.0-rc2
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
kobject.h File Reference
#include <stdint.h>
#include <stddef.h>
#include <zephyr/sys/iterable_sections.h>
#include <zephyr/sys/internal/kobject_internal.h>
#include <zephyr/syscalls/kobject.h>

Go to the source code of this file.

Macros

#define K_THREAD_ACCESS_GRANT(name_, ...)
 Grant a static thread access to a list of kernel objects.
 
#define K_OBJ_FLAG_INITIALIZED   BIT(0)
 Object initialized.
 
#define K_OBJ_FLAG_PUBLIC   BIT(1)
 Object is Public.
 
#define K_OBJ_FLAG_ALLOC   BIT(2)
 Object allocated.
 
#define K_OBJ_FLAG_DRIVER   BIT(3)
 Driver Object.
 

Enumerations

enum  k_objects { K_OBJ_ANY , K_OBJ_LAST }
 Kernel Object Types. More...
 

Functions

void k_object_access_grant (const void *object, struct k_thread *thread)
 Grant a thread access to a kernel object.
 
void k_object_access_revoke (const void *object, struct k_thread *thread)
 Revoke a thread's access to a kernel object.
 
void k_object_release (const void *object)
 Release an object.
 
void k_object_access_all_grant (const void *object)
 Grant all present and future threads access to an object.
 
bool k_object_is_valid (const void *obj, enum k_objects otype)
 Check if a kernel object is of certain type and is valid.
 
void * k_object_alloc (enum k_objects otype)
 Allocate a kernel object of a designated type.
 
void * k_object_alloc_size (enum k_objects otype, size_t size)
 Allocate a kernel object of a designated type and a given size.
 
void k_object_free (void *obj)
 Free a kernel object previously allocated with k_object_alloc()
 

Enumeration Type Documentation

◆ k_objects

enum k_objects

Kernel Object Types.

This enumeration needs to be kept in sync with the lists of kernel objects and subsystems in scripts/build/gen_kobject_list.py, as well as the otype_to_str() function in kernel/userspace.c

Enumerator
K_OBJ_ANY 
K_OBJ_LAST