-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
spinlock: Implement reader/writer locking, remove deadlock recovery
- Implement spin_read_lock(), spin_read_unlock() etc, so that multiple reader threads may enter a critical section simultaneously - Optimize waiters check in spin_unlock() - Print a debug report and crash on invalid lock/unlock usage - Upon detecting a possible deadlock, simply print a debug report - deadlock recovery may be abused and turned into a race condition - Extend deadlock detection timeout to 10 seconds - Optimize short spin loop in spin_lock_wait() by issuing a `pause` instruction on x86_64, and `isb sy` on arm64
- Loading branch information
Showing
2 changed files
with
206 additions
and
61 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