Sound Open Firmware
Loading...
Searching...
No Matches
userspace_helper.h File Reference
Include dependency graph for userspace_helper.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define APP_TASK_BSS
 Userspace support functions.
#define APP_TASK_DATA
#define APP_SYSUSER_BSS
#define APP_SYSUSER_DATA

Functions

void * user_stack_allocate (size_t stack_size, uint32_t options)
 Allocates thread stack memory.
int user_stack_free (void *p_stack)
 Free thread stack memory.
void module_driver_heap_remove (struct k_heap *mod_drv_heap)
 Free private processing module heap.
static int user_access_to_mailbox (struct k_mem_domain *domain, k_tid_t thread_id)
static int user_memory_attach_system_user_partition (struct k_mem_domain *dom)
 Attach SOF system user memory partition to a memory domain.

Macro Definition Documentation

◆ APP_SYSUSER_BSS

#define APP_SYSUSER_BSS

◆ APP_SYSUSER_DATA

#define APP_SYSUSER_DATA

◆ APP_TASK_BSS

#define APP_TASK_BSS

Userspace support functions.

◆ APP_TASK_DATA

#define APP_TASK_DATA

Function Documentation

◆ module_driver_heap_remove()

void module_driver_heap_remove ( struct k_heap * mod_drv_heap)

Free private processing module heap.

Parameters
mod_drv_heappointer to the k_heap structure.
Note
Function used only when CONFIG_USERSPACE is set. Frees private module heap.

◆ user_access_to_mailbox()

int user_access_to_mailbox ( struct k_mem_domain * domain,
k_tid_t thread_id )
inlinestatic

◆ user_memory_attach_system_user_partition()

int user_memory_attach_system_user_partition ( struct k_mem_domain * dom)
inlinestatic

Attach SOF system user memory partition to a memory domain.

Parameters
dom- memory domain to attach the sysuser partition to.
Returns
0 for success, error otherwise.
Note
Function used only when CONFIG_USERSPACE is set. The sysuser partition contains shared objects required by user-space modules.

◆ user_stack_allocate()

void * user_stack_allocate ( size_t stack_size,
uint32_t options )

Allocates thread stack memory.

Parameters
stack_sizeRequired stack size.
optionsStack configuration options K_USER - when creating user thread 0 - when creating kernel thread
Returns
pointer to the stack or NULL if not created.

When CONFIG_USERSPACE not set function calls rballoc_align(), otherwise it uses k_thread_stack_alloc() routine.

◆ user_stack_free()

int user_stack_free ( void * p_stack)

Free thread stack memory.

Parameters
p_stackPointer to the stack.
Returns
0 for success, error otherwise.
Note
When CONFIG_USERSPACE not set function calls rfree(), otherwise it uses k_thread_stack_free() routine.