aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Роман Кривенков <qwerty19106@gmail.com> 2020-03-18 09:28:42 +0400
committerGravatar Роман Кривенков <qwerty19106@gmail.com> 2020-03-18 09:28:42 +0400
commit9c5740592e652b2f612b90478cb8f2431c6ccb4d (patch)
tree4b7f8571181a386e8c4aa865a4e0c0adb4c4d5ff
parentc3dba123a7a01144f8f092f7c0c361b955ebf674 (diff)
downloadcortex-m-9c5740592e652b2f612b90478cb8f2431c6ccb4d.tar.gz
cortex-m-9c5740592e652b2f612b90478cb8f2431c6ccb4d.tar.zst
cortex-m-9c5740592e652b2f612b90478cb8f2431c6ccb4d.zip
Add TODO with link to rust-lang/rust/issues/13926
-rw-r--r--src/peripheral/scb.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/peripheral/scb.rs b/src/peripheral/scb.rs
index 949f890..940809e 100644
--- a/src/peripheral/scb.rs
+++ b/src/peripheral/scb.rs
@@ -951,6 +951,7 @@ impl SCB {
// NOTE(unsafe) atomic read with no side effects
// NOTE(unsafe): Index is bounded to [4,15] by SystemHandler design.
+ // TODO: Review it after rust-lang/rust/issues/13926 will be fixed.
let priority_ref = unsafe {(*Self::ptr()).shpr.get_unchecked(usize::from(index - 4))};
priority_ref.read()
@@ -961,6 +962,7 @@ impl SCB {
// NOTE(unsafe) atomic read with no side effects
// NOTE(unsafe): Index is bounded to [11,15] by SystemHandler design.
+ // TODO: Review it after rust-lang/rust/issues/13926 will be fixed.
let priority_ref = unsafe {(*Self::ptr()).shpr.get_unchecked(usize::from((index - 8) / 4))};
let shpr = priority_ref.read();
@@ -988,6 +990,7 @@ impl SCB {
#[cfg(not(armv6m))]
{
// NOTE(unsafe): Index is bounded to [4,15] by SystemHandler design.
+ // TODO: Review it after rust-lang/rust/issues/13926 will be fixed.
let priority_ref = (*Self::ptr()).shpr.get_unchecked(usize::from(index - 4));
priority_ref.write(prio)
@@ -996,6 +999,7 @@ impl SCB {
#[cfg(armv6m)]
{
// NOTE(unsafe): Index is bounded to [11,15] by SystemHandler design.
+ // TODO: Review it after rust-lang/rust/issues/13926 will be fixed.
let priority_ref = (*Self::ptr()).shpr.get_unchecked(usize::from((index - 8) / 4));
priority_ref.modify(|value| {