lambdaOS 0.1.0

A simple operating system written in Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use alloc::String;
use task::{ProcessId, Scheduling, SCHEDULER};
use arch::interrupts::disable_interrupts_and_then;

//Simple system call that wraps creating a process and marking it as ready.
pub fn create(new: extern "C" fn(), name: String) -> ProcessId {
    disable_interrupts_and_then(|| -> ProcessId {
        let pid = SCHEDULER
            .create(new, name)
            .expect("Could not create new process!");
        SCHEDULER.ready(pid.clone());
        pid
    })
}