Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 4 pull requests #91253

Merged
merged 10 commits into from
Nov 26, 2021
Prev Previous commit
Next Next commit
Improving the readability
Co-authored-by: kennytm <kennytm@gmail.com>
  • Loading branch information
stlankes and kennytm authored Nov 24, 2021
commit 6911af9d06ef4f92659326ce426c6aefc7b47282
2 changes: 1 addition & 1 deletion library/std/src/sys/hermit/mutex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ impl<T> Spinlock<T> {
let ticket = self.queue.fetch_add(1, Ordering::SeqCst) + 1;
let mut counter: u16 = 0;
while self.dequeue.load(Ordering::SeqCst) != ticket {
counter = counter + 1;
counter += 1;
if counter < 100 {
hint::spin_loop();
} else {
Expand Down