forked from future-proof-iot/RIOT-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(threads/armv8): don't save high regs on first schedule
With future-proof-iot#262, the `current_pid` is not set before the scheduler is triggered for the first time, and therefore `None` on the first run. The pointer to `current_high_regs` is therefore set to a null pointer. This causes nrf52840 to hard fault when trying to store registers r4-r11. To fix this, we now skip storing/ loading of r4-r11 if the pointer is zero, i.e. when there was no previously running thread whose context has to be saved.
- Loading branch information
Showing
1 changed file
with
19 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters