1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#![no_std]
#![cfg_attr(feature = "doc_cfg", feature(doc_cfg))]
#![cfg_attr(feature = "nightly", feature(decl_macro))]
#![doc = include_str!("lib.md")]
#![deny(unsafe_op_in_unsafe_fn)]
#![allow(clippy::match_single_binding)] // the `cfg` matching pattern
#![warn(clippy::doc_markdown)]
#![warn(clippy::enum_glob_use)]
#![warn(clippy::if_not_else)]
#![warn(rust_2018_idioms)]
#![cfg_attr(feature = "none", allow(unused_imports))]
#![cfg_attr(feature = "none", allow(unreachable_code))]
#![cfg_attr(feature = "none", allow(unused_variables))]
#![cfg_attr(feature = "none", allow(dead_code))]

/// Changelog (`CHANGELOG.md`)
///
#[doc = include_str!("../CHANGELOG.md")]
pub mod _changelog_ {}

pub mod abi;

#[cfg(all(feature = "nightly", feature = "unstable"))]
#[cfg_attr(
    feature = "doc_cfg",
    doc(cfg(all(feature = "nightly", feature = "unstable")))
)]
pub mod macros;

macro_rules! unstable_module {
    {$(
        $( #[macro_use $($unused:tt)*] )*
        $( #[doc = $doc:tt] )*
        $( #[cfg( $($cfg:tt)* )] )?
        pub mod $name:ident $semicolon_or_brace:tt
    )*} => {$(
        $( #[macro_use $($unused)*] )*
        $( #[doc = $doc] )*
        #[cfg(all(feature = "unstable", $($($cfg)*)?))]
        #[cfg_attr(
            feature = "doc_cfg",
            doc(cfg(all(feature = "unstable", $($($cfg)*)?)))
        )]
        pub mod $name $semicolon_or_brace
    )*};
}

unstable_module! {
    #[macro_use]
    pub mod error;
    pub mod closure;
    pub mod dataqueue;
    pub mod eventflag;
    pub mod interrupt;
    pub mod kernel;
    pub mod memorypool;
    #[cfg(any(
        all(feature = "asp3", feature = "messagebuf"),
        all(feature = "solid_asp3", feature = "messagebuf"),
        feature = "none",
    ))]
    pub mod messagebuffer;
    pub mod mutex;
    pub mod prioritydataqueue;
    pub mod processor;
    pub mod semaphore;
    pub mod task;
    pub mod wait;
    // TODO: spinlocks

    /// Temporal quantification
    pub mod time {
        mod duration;
        mod systime;
        mod timeout;
        pub use self::{duration::*, systime::*, timeout::*};
        // `use ::*` doesn't work with `pub macro`. This could be a bug.
        #[cfg(feature = "nightly")]
        pub use self::{duration::duration, timeout::timeout};
    }
}