aboutsummaryrefslogtreecommitdiff
path: root/book/en/src/by-example/app.md
diff options
context:
space:
mode:
authordatdenkikniet <jcdra1@gmail.com>2023-05-05 19:31:25 +0200
committerdatdenkikniet <jcdra1@gmail.com>2023-05-11 19:20:58 +0200
commitab17bbf9f37e81b9aab88694e73d23f54664fa01 (patch)
treeb7ce123929c9a39a28fbf8e36a24528b99f221f7 /book/en/src/by-example/app.md
parent5c6483f71b1622e518847006147f2360c7563aa6 (diff)
Demarcate a bit more
Diffstat (limited to 'book/en/src/by-example/app.md')
-rw-r--r--book/en/src/by-example/app.md6
1 files changed, 6 insertions, 0 deletions
diff --git a/book/en/src/by-example/app.md b/book/en/src/by-example/app.md
index b5815fc..0aeed5b 100644
--- a/book/en/src/by-example/app.md
+++ b/book/en/src/by-example/app.md
@@ -30,6 +30,12 @@ At compile time the task/resource model is analyzed under the Stack Resource Pol
Overall, the generated code infers no additional overhead in comparison to a hand-written implementation, thus in Rust terms RTIC offers a zero-cost abstraction to concurrency.
+## Priority
+
+Priorities in RTIC are specified using the `priority = N` (where N is a positive number) argument passed to the `#[task]` attribute. All `#[task]`s can have a priority. If the priority of a task is not specified, it is set to the default value of 1.
+
+Priorities in RTIC follow a higher value = more important scheme. For examples, a task with priority 2 will preempt a task with priority 1.
+
## An RTIC application example
To give a taste of RTIC, the following example contains commonly used features.