Struct x86_64::structures::idt::InterruptStackFrame [−][src]
#[repr(C)]pub struct InterruptStackFrame { /* fields omitted */ }
Expand description
Wrapper type for the interrupt stack frame pushed by the CPU.
This type derefs to an InterruptStackFrameValue
, which allows reading the actual values.
This wrapper type ensures that no accidental modification of the interrupt stack frame
occurs, which can cause undefined behavior (see the as_mut
method for more information).
Implementations
impl InterruptStackFrame
[src]
impl InterruptStackFrame
[src]pub unsafe fn as_mut(&mut self) -> Volatile<&mut InterruptStackFrameValue>
[src]
pub unsafe fn as_mut(&mut self) -> Volatile<&mut InterruptStackFrameValue>
[src]Gives mutable access to the contents of the interrupt stack frame.
The Volatile
wrapper is used because LLVM optimizations remove non-volatile
modifications of the interrupt stack frame.
Safety
This function is unsafe since modifying the content of the interrupt stack frame can easily lead to undefined behavior. For example, by writing an invalid value to the instruction pointer field, the CPU can jump to arbitrary code at the end of the interrupt.
Also, it is not fully clear yet whether modifications of the interrupt stack frame are officially supported by LLVM’s x86 interrupt calling convention.
Trait Implementations
impl Debug for InterruptStackFrame
[src]
impl Debug for InterruptStackFrame
[src]impl Deref for InterruptStackFrame
[src]
impl Deref for InterruptStackFrame
[src]type Target = InterruptStackFrameValue
type Target = InterruptStackFrameValue
The resulting type after dereferencing.