rt 0.19.1

A real-time operating system capable of full preemption
Documentation
#![no_main]
#![cfg_attr(target_os = "none", no_std)]

use core::sync::atomic::{AtomicU32, Ordering};

rt::sem!(H, 2);
rt::sem!(O, 1);
rt::barrier!(BARRIER, 3);

fn hydrogen() {
    H.wait();
    BARRIER.wait();
    BARRIER.wait();
    H.post();
}

fn oxygen() {
    O.wait();
    BARRIER.wait();
    make_water();
    BARRIER.wait();
    O.post();
}

include!("water.rs");