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
svgbobdoc::transform! { /**
```svgbob,[trait_binding]
Application and library code
.----------. .--------------------. .-----------.
| your_isr | | your_timer_handler | | your_task |
'----------' '--------------------' '-----------'
| | | |
────────────────────────|──────────────────|────────────────|───|──────────────────────────
Facade API |------------------+----------------' |
| |
| v
"r3::*" | .-------------------------------.
| | struct sync::Mutex<System, T> |
| '-------------------------------'
| |
────────────────────────|───────────────────────────────|──────────────────────────────────
Core API | .---------+----------------.
v | |
.--------------. v v
| trait Kernel | .----------------------. .---------------------.
"r3_core::kernel"+--------------+ | struct Mutex<System> | | struct Hunk<System> |
| impl Kernel | '----------------------' '---------------------'
'--------------' | |
| | |
─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ | ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ | ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ | ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
| | |
v v v
System type .------------------. .-------------------. .--------------------.
interface | trait KernelBase | | trait KernelMutex | | trait KernelStatic | . . .
'------------------' '-------------------' '--------------------'
| | |
─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ | ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ | ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ | ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
| | |
| | v
"r3::kernel::cfg" | | .-------------------.
"::attach_static!" | | | impl KernelStatic |
| | '-------------------'
| |
Core API | |
Implementation | |
────────────────────────|─────────────────────|────────────────────────────────────────────
| |
System type v v
implementation .-----------------. .------------------.
"(chosen by an" | impl KernelBase | | impl KernelMutex |
"application)" '-----------------' '------------------'
```
*/ }