We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
VirtAddr
Entry::handler_addr()
1 parent b87ecd0 commit 6cb2ff7Copy full SHA for 6cb2ff7
src/structures/idt.rs
@@ -735,12 +735,13 @@ impl<F> Entry<F> {
735
&mut self.options
736
}
737
738
- /// Returns the virtual address of this IDT entry's handler function as a `u64`.
+ /// Returns the virtual address of this IDT entry's handler function.
739
#[inline]
740
- pub fn handler_addr(&self) -> u64 {
741
- self.pointer_low as u64
+ pub fn handler_addr(&self) -> VirtAddr {
+ let addr = self.pointer_low as u64
742
| (self.pointer_middle as u64) << 16
743
- | (self.pointer_high as u64) << 32
+ | (self.pointer_high as u64) << 32;
744
+ VirtAddr::new_truncate(addr)
745
746
747
0 commit comments