Skip to content

Commit d95f292

Browse files
committed
mention interrupt shadow in doc comment
1 parent c618de4 commit d95f292

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/instructions/interrupts.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ pub fn are_enabled() -> bool {
1313
/// Enable interrupts.
1414
///
1515
/// This is a wrapper around the `sti` instruction.
16+
///
17+
/// This function executes `sti; nop` to ensure that the interrupt shadow
18+
/// caused by the `sti` instruction doesn't last beyond this function.
19+
/// Use [`enable_and_hlt`] to execute `hlt` in `sti`'s interrupt shadow.
1620
#[inline]
1721
pub fn enable() {
1822
// Omit `nomem` to imitate a lock release. Otherwise, the compiler

0 commit comments

Comments
 (0)