diff options
| author | Andrey Zgarbul <zgarbul.andrey@gmail.com> | 2021-04-03 20:30:34 +0300 |
|---|---|---|
| committer | Andrey Zgarbul <zgarbul.andrey@gmail.com> | 2021-07-09 18:44:19 +0300 |
| commit | e4319de3d526285381f5cc53e14f9a17d123a81a (patch) | |
| tree | b8ed1d60401f508f97e8f4cf151b295f11b79d24 /book/en/src/internals/tasks.md | |
| parent | c67657371b9f27353caae8a8ccf6e94cd0f25110 (diff) | |
const generics
Diffstat (limited to 'book/en/src/internals/tasks.md')
| -rw-r--r-- | book/en/src/internals/tasks.md | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/book/en/src/internals/tasks.md b/book/en/src/internals/tasks.md index a533dc0..0407176 100644 --- a/book/en/src/internals/tasks.md +++ b/book/en/src/internals/tasks.md @@ -78,8 +78,8 @@ mod app { } // ready queue of the task dispatcher - // `U4` is a type-level integer that represents the capacity of this queue - static mut RQ1: Queue<Ready<T1>, U4> = Queue::new(); + // `5-1=4` represents the capacity of this queue + static mut RQ1: Queue<Ready<T1>, 5> = Queue::new(); // interrupt handler chosen to dispatch tasks at priority `1` #[no_mangle] @@ -153,7 +153,7 @@ mod app { // used to track how many more `bar` messages can be enqueued // `U2` is the capacity of the `bar` task; a max of two instances can be queued // this queue is filled by the framework before `init` runs - static mut bar_FQ: Queue<(), U2> = Queue::new(); + static mut bar_FQ: Queue<(), 3> = Queue::new(); // Priority ceiling for the consumer endpoint of `bar_FQ` const bar_FQ_CEILING: u8 = 2; @@ -227,7 +227,7 @@ mod app { // the free queue: used to track free slots in the `baz_INPUTS` array // this queue is initialized with values `0` and `1` before `init` is executed - static mut baz_FQ: Queue<u8, U2> = Queue::new(); + static mut baz_FQ: Queue<u8, 3> = Queue::new(); // Priority ceiling for the consumer endpoint of `baz_FQ` const baz_FQ_CEILING: u8 = 2; |
