Commit 0c6f762 1 parent 99f708d commit 0c6f762 Copy full SHA for 0c6f762
File tree 2 files changed +2
-8
lines changed
2 files changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -162,15 +162,12 @@ SST_LockKey SST_Task_lock(SST_TaskPrio ceiling) {
162
162
*/
163
163
uint32_t nvic_prio = ((0xFFU >> nvic_prio_shift ) + 1U - ceiling )
164
164
<< nvic_prio_shift ;
165
- SST_LockKey basepri_ ;
165
+ SST_LockKey basepri_ ; /* initialized in the following asm() instruction */
166
166
__asm volatile ("mrs %0,BASEPRI" : "=r" (basepri_ ) :: );
167
167
if (basepri_ > nvic_prio ) { /* current priority lower than the ceiling? */
168
168
__asm volatile ("cpsid i\n msr BASEPRI,%0\n cpsie i"
169
169
:: "r" (nvic_prio ) : );
170
170
}
171
- else {
172
- basepri_ = nvic_prio ;
173
- }
174
171
return basepri_ ;
175
172
#endif
176
173
}
Original file line number Diff line number Diff line change @@ -165,15 +165,12 @@ LockKey Task::lock(TaskPrio ceiling) {
165
165
//
166
166
uint32_t nvic_prio = ((0xFFU >> nvic_prio_shift) + 1U - ceiling)
167
167
<< nvic_prio_shift;
168
- LockKey basepri_;
168
+ LockKey basepri_; // initialized in the following asm() instruction
169
169
__asm volatile (" mrs %0,BASEPRI" : " =r" (basepri_) :: );
170
170
if (basepri_ > nvic_prio) { // current priority lower than the ceiling?
171
171
__asm volatile (" cpsid i\n msr BASEPRI,%0\n cpsie i"
172
172
:: " r" (nvic_prio) : );
173
173
}
174
- else {
175
- basepri_ = nvic_prio;
176
- }
177
174
return basepri_;
178
175
#endif
179
176
}
You can’t perform that action at this time.
0 commit comments