Commit 94fbbb8
committed
zephyr: Remove 'unsafe' from sys::Mutex::unlock
Although this function has constraints on how it can be used (the thread
that calls unlock must also have called lock). However, according to
the documentation, it detects this, and returns an error. As such, the
wrapper in Rust does not need to be `unsafe` but can merely reflect that
error code in the `Result` that it returns.
Signed-off-by: David Brown <[email protected]>1 parent b9570ca commit 94fbbb8
File tree
2 files changed
+2
-4
lines changed- samples/philosophers/src
- zephyr/src/sys/sync
2 files changed
+2
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
44 | | - | |
45 | | - | |
| 43 | + | |
46 | 44 | | |
47 | 45 | | |
48 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| |||
0 commit comments