ariel_os::thread

Function create

pub fn create<T>(
    func: fn(_: T),
    arg: T,
    stack: &'static mut [u8],
    prio: u8,
    core_affinity: Option<CoreAffinity>,
) -> ThreadId
where T: Arguable + Send,
Available on crate feature threading only.
Expand description

Low-level function to create a thread that runs func with arg.

This sets up the stack for the thread and adds it to the runqueue.

§Panics

Panics if more than THREAD_COUNT concurrent threads have been created.