-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Saving one "&" operation in the Mutex::Unlock fast path. This has likely no performance impact (the two AND instructions ran in parallel anyway), but is as complex as the current solution, and enables two possible improvements in the future. 1. If bits Ev, Wr, Wa, De are made into the highest bits in the kMuLow, then the second "&" operation can be omitted because if kMuWriter is set, the there are no readers, so the kMuHigh bits are zero. 2. If the meanings of kMuWriter and kMuDesig are flipped, then the "^" operation is not needed either. PiperOrigin-RevId: 679272590 Change-Id: Iea7a04df0118d2410b7bfdab70b30e33d4b90e43
- Loading branch information
1 parent
ba5fd09
commit 482ca0b
Showing
1 changed file
with
38 additions
and
12 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