Struct twizzler_abi::upcall::UpcallTarget
source · #[repr(C)]pub struct UpcallTarget {
pub self_address: usize,
pub super_address: usize,
pub super_stack: usize,
pub super_stack_size: usize,
pub super_thread_ptr: usize,
pub super_ctx: ObjID,
pub options: [UpcallOptions; 3],
}
Expand description
Information for handling an upcall, per-thread. By default, a thread starts with all these fields initialized to zero, and the mode set to UpcallMode::Abort.
Fields§
§self_address: usize
Address to jump to when handling via a call to the same context.
super_address: usize
Address to jump to when handling via a call to supervisor context.
super_stack: usize
Address of supervisor stack to use, when switching to supervisor context.
super_stack_size: usize
Size of the super stack.
super_thread_ptr: usize
Value to use for stack pointer, when switching to supervisor context.
super_ctx: ObjID
Supervisor context to use, when switching to supervisor context.
options: [UpcallOptions; 3]
Per-upcall options.
Implementations§
source§impl UpcallTarget
impl UpcallTarget
sourcepub fn new(
self_address: Option<unsafe extern "C-unwind" fn(_: *mut UpcallFrame, _: *const UpcallData) -> !>,
super_address: Option<unsafe extern "C-unwind" fn(_: *mut UpcallFrame, _: *const UpcallData) -> !>,
super_stack: usize,
super_stack_size: usize,
super_thread_ptr: usize,
super_ctx: ObjID,
options: [UpcallOptions; 3]
) -> Self
pub fn new( self_address: Option<unsafe extern "C-unwind" fn(_: *mut UpcallFrame, _: *const UpcallData) -> !>, super_address: Option<unsafe extern "C-unwind" fn(_: *mut UpcallFrame, _: *const UpcallData) -> !>, super_stack: usize, super_stack_size: usize, super_thread_ptr: usize, super_ctx: ObjID, options: [UpcallOptions; 3] ) -> Self
Construct a new upcall target.
Trait Implementations§
source§impl Clone for UpcallTarget
impl Clone for UpcallTarget
source§fn clone(&self) -> UpcallTarget
fn clone(&self) -> UpcallTarget
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for UpcallTarget
impl Debug for UpcallTarget
source§impl Ord for UpcallTarget
impl Ord for UpcallTarget
source§fn cmp(&self, other: &UpcallTarget) -> Ordering
fn cmp(&self, other: &UpcallTarget) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<UpcallTarget> for UpcallTarget
impl PartialEq<UpcallTarget> for UpcallTarget
source§fn eq(&self, other: &UpcallTarget) -> bool
fn eq(&self, other: &UpcallTarget) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<UpcallTarget> for UpcallTarget
impl PartialOrd<UpcallTarget> for UpcallTarget
source§fn partial_cmp(&self, other: &UpcallTarget) -> Option<Ordering>
fn partial_cmp(&self, other: &UpcallTarget) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for UpcallTarget
impl Eq for UpcallTarget
impl StructuralEq for UpcallTarget
impl StructuralPartialEq for UpcallTarget
Auto Trait Implementations§
impl ObjSafe for UpcallTarget
impl RefUnwindSafe for UpcallTarget
impl Send for UpcallTarget
impl Sync for UpcallTarget
impl Unpin for UpcallTarget
impl UnwindSafe for UpcallTarget
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more