Zephyr API Documentation
2.7.0-rc2
A Scalable Open Source RTOS
|
#include <toolchain.h>
#include <stddef.h>
#include <zephyr/types.h>
#include <arch/cpu.h>
#include <irq_offload.h>
#include <timing/types.h>
#include <arch/arch_inlines.h>
Go to the source code of this file.
Typedefs | |
typedef struct z_thread_stack_element | k_thread_stack_t |
Typedef of struct z_thread_stack_element. More... | |
typedef void(* | k_thread_entry_t) (void *p1, void *p2, void *p3) |
Thread entry point function type. More... | |
typedef FUNC_NORETURN void(* | arch_cpustart_t) (void *data) |
Functions | |
static uint32_t | arch_k_cycle_get_32 (void) |
void | arch_cpu_idle (void) |
Power save idle routine. More... | |
void | arch_cpu_atomic_idle (unsigned int key) |
Atomically re-enable interrupts and enter low power mode. More... | |
void | arch_start_cpu (int cpu_num, k_thread_stack_t *stack, int sz, arch_cpustart_t fn, void *arg) |
Start a numbered CPU on a MP-capable system. More... | |
bool | arch_cpu_active (int cpu_num) |
Return CPU power status. More... | |
static unsigned int | arch_irq_lock (void) |
static void | arch_irq_unlock (unsigned int key) |
static bool | arch_irq_unlocked (unsigned int key) |
void | arch_irq_disable (unsigned int irq) |
void | arch_irq_enable (unsigned int irq) |
int | arch_irq_is_enabled (unsigned int irq) |
int | arch_irq_connect_dynamic (unsigned int irq, unsigned int priority, void(*routine)(const void *parameter), const void *parameter, uint32_t flags) |
static struct _cpu * | arch_curr_cpu (void) |
void | arch_sched_ipi (void) |
static uintptr_t | arch_syscall_invoke0 (uintptr_t call_id) |
static uintptr_t | arch_syscall_invoke1 (uintptr_t arg1, uintptr_t call_id) |
static uintptr_t | arch_syscall_invoke2 (uintptr_t arg1, uintptr_t arg2, uintptr_t call_id) |
static uintptr_t | arch_syscall_invoke3 (uintptr_t arg1, uintptr_t arg2, uintptr_t arg3, uintptr_t call_id) |
static uintptr_t | arch_syscall_invoke4 (uintptr_t arg1, uintptr_t arg2, uintptr_t arg3, uintptr_t arg4, uintptr_t call_id) |
static uintptr_t | arch_syscall_invoke5 (uintptr_t arg1, uintptr_t arg2, uintptr_t arg3, uintptr_t arg4, uintptr_t arg5, uintptr_t call_id) |
static uintptr_t | arch_syscall_invoke6 (uintptr_t arg1, uintptr_t arg2, uintptr_t arg3, uintptr_t arg4, uintptr_t arg5, uintptr_t arg6, uintptr_t call_id) |
static bool | arch_is_user_context (void) |
int | arch_mem_domain_max_partitions_get (void) |
Get the maximum number of partitions for a memory domain. More... | |
int | arch_buffer_validate (void *addr, size_t size, int write) |
Check memory region permissions. More... | |
FUNC_NORETURN void | arch_user_mode_enter (k_thread_entry_t user_entry, void *p1, void *p2, void *p3) |
FUNC_NORETURN void | arch_syscall_oops (void *ssf) |
Induce a kernel oops that appears to come from a specific location. More... | |
size_t | arch_user_string_nlen (const char *s, size_t maxsize, int *err) |
Safely take the length of a potentially bad string. More... | |
static bool | arch_mem_coherent (void *ptr) |
Detect memory coherence type. More... | |
static void | arch_cohere_stacks (struct k_thread *old_thread, void *old_switch_handle, struct k_thread *new_thread) |
Ensure cache coherence prior to context switch. More... | |
void | arch_gdb_init (void) |
Architecture layer debug start. More... | |
void | arch_gdb_continue (void) |
Continue running program. More... | |
void | arch_gdb_step (void) |
Continue with one step. More... | |
void | arch_timing_init (void) |
Initialize the timing subsystem. More... | |
void | arch_timing_start (void) |
Signal the start of the timing information gathering. More... | |
void | arch_timing_stop (void) |
Signal the end of the timing information gathering. More... | |
timing_t | arch_timing_counter_get (void) |
Return timing counter. More... | |
uint64_t | arch_timing_cycles_get (volatile timing_t *const start, volatile timing_t *const end) |
Get number of cycles between start and end . More... | |
uint64_t | arch_timing_freq_get (void) |
Get frequency of counter used (in Hz). More... | |
uint64_t | arch_timing_cycles_to_ns (uint64_t cycles) |
Convert number of cycles into nanoseconds. More... | |
uint64_t | arch_timing_cycles_to_ns_avg (uint64_t cycles, uint32_t count) |
Convert number of cycles into nanoseconds with averaging. More... | |
uint32_t | arch_timing_freq_get_mhz (void) |
Get frequency of counter used (in MHz). More... | |
k_thread_entry_t |
Thread entry point function type.
A thread's entry point function is invoked when the thread starts executing. Up to 3 argument values can be passed to the function.
The thread terminates execution permanently if the entry point function returns. The thread is responsible for releasing any shared resources it may own (such as mutexes and dynamically allocated memory), prior to returning.
p1 | First argument. |
p2 | Second argument. |
p3 | Third argument. |
Typedef of struct z_thread_stack_element.