File tree 2 files changed +7
-2
lines changed 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 1
1
# Unreleased
2
2
3
+ - Fix ` spin_loop_hint ` warning on Rust 1.51
4
+
3
5
# 0.2.2 – 2020-08-24
4
6
5
7
- Add owning_ref support ([ #7 ] ( https://github.com/rust-osdev/spinning_top/pull/7 ) )
Original file line number Diff line number Diff line change 3
3
// and
4
4
// https://github.com/mvdnes/spin-rs/tree/7516c8037d3d15712ba4d8499ab075e97a19d778
5
5
6
- use core:: sync:: atomic:: { spin_loop_hint, AtomicBool , Ordering } ;
6
+ use core:: {
7
+ hint,
8
+ sync:: atomic:: { AtomicBool , Ordering } ,
9
+ } ;
7
10
use lock_api:: { GuardSend , RawMutex } ;
8
11
9
12
/// Provides mutual exclusion based on spinning on an `AtomicBool`.
@@ -51,7 +54,7 @@ unsafe impl RawMutex for RawSpinlock {
51
54
// Code from https://github.com/mvdnes/spin-rs/commit/d3e60d19adbde8c8e9d3199c7c51e51ee5a20bf6
52
55
while self . is_locked ( ) {
53
56
// Tell the CPU that we're inside a busy-wait loop
54
- spin_loop_hint ( ) ;
57
+ hint :: spin_loop ( ) ;
55
58
}
56
59
}
57
60
}
You can’t perform that action at this time.
0 commit comments