Skip to content

Commit 5384bd1

Browse files
committed
Update docs to clarify new defaults for set_handler_fn
1 parent fb5416c commit 5384bd1

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

src/structures/idt.rs

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -771,10 +771,12 @@ impl<F> Entry<F> {
771771
}
772772
}
773773

774-
/// Set the handler address for the IDT entry and sets the present bit.
775-
///
776-
/// For the code selector field, this function uses the code segment selector currently
777-
/// active in the CPU.
774+
/// Sets the handler address for the IDT entry and sets the following defaults:
775+
/// - The code selector is the code segment currently active in the CPU
776+
/// - The present bit is set
777+
/// - Interrupts are disabled on handler invocation
778+
/// - The privilege level (DPL) is [`PrivilegeLevel::Ring0`]
779+
/// - No IST is configured (existing stack will be used)
778780
///
779781
/// The function returns a mutable reference to the entry's options that allows
780782
/// further customization.
@@ -814,10 +816,12 @@ impl<F> Entry<F> {
814816

815817
#[cfg(feature = "instructions")]
816818
impl<F: HandlerFuncType> Entry<F> {
817-
/// Set the handler function for the IDT entry and sets the present bit.
818-
///
819-
/// For the code selector field, this function uses the code segment selector currently
820-
/// active in the CPU.
819+
/// Sets the handler function for the IDT entry and sets the following defaults:
820+
/// - The code selector is the code segment currently active in the CPU
821+
/// - The present bit is set
822+
/// - Interrupts are disabled on handler invocation
823+
/// - The privilege level (DPL) is [`PrivilegeLevel::Ring0`]
824+
/// - No IST is configured (existing stack will be used)
821825
///
822826
/// The function returns a mutable reference to the entry's options that allows
823827
/// further customization.

0 commit comments

Comments
 (0)