aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorJorge Aparicio <jorge@japaric.io>2017-04-25 10:24:17 -0500
committerJorge Aparicio <jorge@japaric.io>2017-04-25 10:24:17 -0500
commit59cff5815b4ebde5f146575f02f39e1480b87505 (patch)
tree91c4cb24282cc38935e2a4ac915aa1e0a541ade2 /src/lib.rs
parent39c111a59a077da8d8ea310a45aac4bf78242692 (diff)
update examples in doc comments
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs34
1 files changed, 27 insertions, 7 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 04a95a1..687e8ec 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -14,8 +14,8 @@
//!
//! - **Event triggered tasks** as the unit of concurrency.
//! - Supports prioritization of tasks and, thus, **preemptive multitasking**.
-//! - **Data race free memory sharing** through fine grained *partial* critical
-//! sections.
+//! - **Data race free memory sharing** through fine grained *non global*
+//! critical sections.
//! - **Deadlock free execution** guaranteed at compile time.
//! - **Minimal overhead** as the scheduler has no software component / runtime; the
//! hardware does all the scheduling.
@@ -134,7 +134,11 @@
//!
//! // TASKS
//! tasks!(stm32f30x, {
-//! periodic: (Tim7, P1, true),
+//! periodic: Task {
+//! interrupt: Tim7,
+//! priority: P1,
+//! enabled: true,
+//! },
//! });
//!
//! fn periodic(mut task: Tim7, _priority: P1) {
@@ -184,8 +188,16 @@
//! // omitted: `idle`, `init`
//!
//! tasks!(stm32f30x, {
-//! t1: (Tim6Dacunder, P1, true),
-//! t2: (Tim7, P1, true),
+//! t1: Task {
+//! interrupt: Tim6Dacunder,
+//! priority: P1,
+//! enabled: true,
+//! },
+//! t2: Task {
+//! interrupt: Tim7,
+//! priority: P1,
+//! enabled: true,
+//! },
//! });
//!
//! // Data shared between tasks `t1` and `t2`
@@ -243,8 +255,16 @@
//! // omitted: `idle`, `init`
//!
//! tasks!(stm32f30x, {
-//! t1: (Tim6Dacunder, P1, true),
-//! t2: (Tim7, P2, true),
+//! t1: Task {
+//! interrupt: Tim6Dacunder,
+//! priority: P1,
+//! enabled: true,
+//! },
+//! t2: Task {
+//! interrupt: Tim7,
+//! priority: P2,
+//! enabled: true,
+//! },
//! });
//!
//! static COUNTER: Resource<Cell<u32>, C2> = Resource::new(Cell::new(0));