Zephyr API Documentation 4.1.99
A Scalable Open Source RTOS
|
|
4.1.99 |
#include <stdbool.h>
Go to the source code of this file.
Typedefs | |
typedef void(* | smp_init_fn) (void *arg) |
Functions | |
void | k_smp_cpu_start (int id, smp_init_fn fn, void *arg) |
Start a CPU. | |
void | k_smp_cpu_resume (int id, smp_init_fn fn, void *arg, bool reinit_timer, bool invoke_sched) |
Resume a previously suspended CPU. | |
typedef void(* smp_init_fn) (void *arg) |
void k_smp_cpu_resume | ( | int | id, |
smp_init_fn | fn, | ||
void * | arg, | ||
bool | reinit_timer, | ||
bool | invoke_sched ) |
Resume a previously suspended CPU.
This function works like k_smp_cpu_start, but does not re-initialize the kernel's internal tracking data for the target CPU. Therefore, k_smp_cpu_start must have previously been called for the target CPU, and it must have verifiably reached an idle/off state (detection of which must be provided by the platform layers). It may be used in cases where platform layers require, for example, that data on the interrupt or idle stack be preserved.
id | ID of target CPU. |
fn | Function to be called before resuming context. |
arg | Argument to fn. |
reinit_timer | True if timer needs to be re-initialized. |
invoke_sched | True if scheduler is invoked after the CPU has started. |
void k_smp_cpu_start | ( | int | id, |
smp_init_fn | fn, | ||
void * | arg ) |
Start a CPU.
This routine is used to manually start the CPU specified by id. It may be called to restart a CPU that had been stopped or powered down, as well as some other scenario. After the CPU has finished initialization, the CPU will be ready to participate in thread scheduling and execution.
id | ID of target CPU. |
fn | Function to be called before letting scheduler run. |
arg | Argument to fn. |