File tree 1 file changed +10
-3
lines changed
1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -103,12 +103,12 @@ where
103
103
/// x86_64::instructions::hlt(); // wait for the next interrupt
104
104
/// }
105
105
///
106
- /// // avoid this race by using `enable_interrupts_and_hlt `:
106
+ /// // avoid this race by using `enable_and_hlt `:
107
107
///
108
108
/// x86_64::instructions::interrupts::disable();
109
109
/// if nothing_to_do() {
110
110
/// // <- no interrupts can occur here (interrupts are disabled)
111
- /// x86_64::instructions::interrupts::enable_interrupts_and_hlt ();
111
+ /// x86_64::instructions::interrupts::enable_and_hlt ();
112
112
/// }
113
113
///
114
114
/// ```
@@ -128,7 +128,7 @@ where
128
128
/// See <http://lkml.iu.edu/hypermail/linux/kernel/1009.2/01406.html> for more
129
129
/// information.
130
130
#[ inline]
131
- pub fn enable_interrupts_and_hlt ( ) {
131
+ pub fn enable_and_hlt ( ) {
132
132
#[ cfg( feature = "inline_asm" ) ]
133
133
unsafe {
134
134
asm ! ( "sti; hlt" , options( nomem, nostack) ) ;
@@ -139,6 +139,13 @@ pub fn enable_interrupts_and_hlt() {
139
139
}
140
140
}
141
141
142
+ /// Alias for [`enable_and_hlt`][enable_and_hlt] for backwards compatibility.
143
+ #[ inline]
144
+ #[ deprecated( note = "Use enable_and_hlt instead" ) ]
145
+ pub fn enable_interrupts_and_hlt ( ) {
146
+ enable_and_hlt ( ) ;
147
+ }
148
+
142
149
/// Cause a breakpoint exception by invoking the `int3` instruction.
143
150
#[ inline]
144
151
pub fn int3 ( ) {
You can’t perform that action at this time.
0 commit comments