Function start_second_core

Source
pub fn start_second_core<const STACK_SIZE: usize>(
    cpu_control: CPU_CTRL<'_>,
    int0: SoftwareInterrupt<'static, 0>,
    int1: SoftwareInterrupt<'static, 1>,
    stack: &'static mut Stack<STACK_SIZE>,
    func: impl FnOnce() + Send + 'static,
)
Expand description

Starts the scheduler on the second CPU core.

Note that the scheduler must be started first, before starting the second core.

The supplied stack and function will be used as the main thread of the second core. The thread will be pinned to the second core.

You can return from the second core’s main thread function. This will cause the scheduler to enter the idle state, but the second core will continue to run interrupt handlers and other tasks.