#[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 for UpcallTarget
impl PartialEq for UpcallTarget
source§impl PartialOrd for UpcallTarget
impl PartialOrd for UpcallTarget
impl Copy for UpcallTarget
impl Eq for UpcallTarget
impl StructuralPartialEq for UpcallTarget
Auto Trait Implementations§
impl Freeze for UpcallTarget
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.