Macro bern_kernel::new_process
source · [−]new_process!() { /* proc-macro */ }
Expand description
Creates a new process and the required linker sections.
Example
ⓘ
// Create a process named `my_proc` with 32kB memory.
static MY_PROC: &Process = bern_kernel::new_process!(my_proc, 32768);
// Place static variable in process memory.
#[link_section = ".process.my_proc"]
static DATA: u32 = 0xDEADBEEF;
#[entry]
fn main() -> ! {
let board = Board::new();
bern_kernel::init();
/*..*/
MY_PROC.init(move |c| {
// Spawn threads.
}).unwrap();
/*..*/
bern_kernel::start();
}