Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion sst_c/ports/arm-cm/sst_port.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ SST_LockKey SST_Task_lock(SST_TaskPrio ceiling) {
<< nvic_prio_shift;
SST_LockKey basepri_; /* initialized in the following asm() instruction */
__asm volatile ("mrs %0,BASEPRI" : "=r" (basepri_) :: );
if (basepri_ > nvic_prio) { /* current priority lower than the ceiling? */
/* masking disabled, or current priority lower than the ceiling? */
if ((basepri_ == 0U) || (basepri_ > nvic_prio)) {
__asm volatile ("cpsid i\n msr BASEPRI,%0\n cpsie i"
:: "r" (nvic_prio) : );
}
Expand Down
3 changes: 2 additions & 1 deletion sst_cpp/ports/arm-cm/sst_port.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@ LockKey Task::lock(TaskPrio ceiling) {
<< nvic_prio_shift;
LockKey basepri_; // initialized in the following asm() instruction
__asm volatile ("mrs %0,BASEPRI" : "=r" (basepri_) :: );
if (basepri_ > nvic_prio) { // current priority lower than the ceiling?
// masking disabled, or current priority lower than the ceiling?
if ((basepri_ == 0U) || (basepri_ > nvic_prio)) {
__asm volatile ("cpsid i\n msr BASEPRI,%0\n cpsie i"
:: "r" (nvic_prio) : );
}
Expand Down