Skip to content

Commit

Permalink
Improving the readability
Browse files Browse the repository at this point in the history
Co-authored-by: kennytm <kennytm@gmail.com>
  • Loading branch information
stlankes and kennytm authored Nov 24, 2021
1 parent 644b445 commit 6911af9
Showing 1 changed file with 1 addition and 1 deletion.
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

0 comments on commit 6911af9

Please sign in to comment.