Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
Architecture-specific SMP APIs

Typedefs

typedef FUNC_NORETURN void(* arch_cpustart_t) (void *data)
 

Functions

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 struct _cpu * arch_curr_cpu (void)
 
void arch_sched_ipi (void)
 

Detailed Description

Typedef Documentation

◆ arch_cpustart_t

typedef FUNC_NORETURN void(* arch_cpustart_t) (void *data)

#include <include/sys/arch_interface.h>

Per-cpu entry function

Parameters
datacontext parameter, implementation specific

Function Documentation

◆ arch_cpu_active()

bool arch_cpu_active ( int  cpu_num)

#include <include/sys/arch_interface.h>

Return CPU power status.

Parameters
cpu_numInteger number of the CPU

◆ arch_curr_cpu()

static struct _cpu * arch_curr_cpu ( void  )
inlinestatic

#include <include/sys/arch_interface.h>

Return the CPU struct for the currently executing CPU

◆ arch_sched_ipi()

void arch_sched_ipi ( void  )

#include <include/sys/arch_interface.h>

Broadcast an interrupt to all CPUs

This will invoke z_sched_ipi() on other CPUs in the system.

◆ arch_start_cpu()

void arch_start_cpu ( int  cpu_num,
k_thread_stack_t stack,
int  sz,
arch_cpustart_t  fn,
void arg 
)

#include <include/sys/arch_interface.h>

Start a numbered CPU on a MP-capable system.

This starts and initializes a specific CPU. The main thread on startup is running on CPU zero, other processors are numbered sequentially. On return from this function, the CPU is known to have begun operating and will enter the provided function. Its interrupts will be initialized but disabled such that irq_unlock() with the provided key will work to enable them.

Normally, in SMP mode this function will be called by the kernel initialization and should not be used as a user API. But it is defined here for special-purpose apps which want Zephyr running on one core and to use others for design-specific processing.

Parameters
cpu_numInteger number of the CPU
stackStack memory for the CPU
szStack buffer size, in bytes
fnFunction to begin running on the CPU.
argUntyped argument to be passed to "fn"