Skip to content

Commit 9c57405

Browse files
committed
Add TODO with link to rust-lang/rust/issues/13926
1 parent c3dba12 commit 9c57405

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/peripheral/scb.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -951,6 +951,7 @@ impl SCB {
951951
// NOTE(unsafe) atomic read with no side effects
952952

953953
// NOTE(unsafe): Index is bounded to [4,15] by SystemHandler design.
954+
// TODO: Review it after rust-lang/rust/issues/13926 will be fixed.
954955
let priority_ref = unsafe {(*Self::ptr()).shpr.get_unchecked(usize::from(index - 4))};
955956

956957
priority_ref.read()
@@ -961,6 +962,7 @@ impl SCB {
961962
// NOTE(unsafe) atomic read with no side effects
962963

963964
// NOTE(unsafe): Index is bounded to [11,15] by SystemHandler design.
965+
// TODO: Review it after rust-lang/rust/issues/13926 will be fixed.
964966
let priority_ref = unsafe {(*Self::ptr()).shpr.get_unchecked(usize::from((index - 8) / 4))};
965967

966968
let shpr = priority_ref.read();
@@ -988,6 +990,7 @@ impl SCB {
988990
#[cfg(not(armv6m))]
989991
{
990992
// NOTE(unsafe): Index is bounded to [4,15] by SystemHandler design.
993+
// TODO: Review it after rust-lang/rust/issues/13926 will be fixed.
991994
let priority_ref = (*Self::ptr()).shpr.get_unchecked(usize::from(index - 4));
992995

993996
priority_ref.write(prio)
@@ -996,6 +999,7 @@ impl SCB {
996999
#[cfg(armv6m)]
9971000
{
9981001
// NOTE(unsafe): Index is bounded to [11,15] by SystemHandler design.
1002+
// TODO: Review it after rust-lang/rust/issues/13926 will be fixed.
9991003
let priority_ref = (*Self::ptr()).shpr.get_unchecked(usize::from((index - 8) / 4));
10001004

10011005
priority_ref.modify(|value| {

0 commit comments

Comments
 (0)