-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
newlib: revert back from spinlocks to using newlib locks for time.h
Spinlocks from spinlock.h do not disable the scheduler and thus cannot safely be directly used as a locking mechanism. A task holding the lock can get pre-empted, and at that point the new running task will also be allowed to take the spinlock and access whatever it was protecting. Another issue is that the task holding a spinlock could migrate to a different core which in turn would cause the application to fail asserts. The current implementation assumes the core that takes the lock is also the core that releases it. Closes #5762
- Loading branch information
1 parent
8a9dc46
commit 6fb996b
Showing
3 changed files
with
19 additions
and
25 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
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
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