pub struct Supervisor {
message_tx: IpcSender<TraceRequest>,
confirm_rx: IpcReceiver<Confirmation>,
event_rx: IpcReceiver<MemEvents>,
}
Expand description
The main means of communication between the child and parent process, allowing the former to send requests and get info from the latter.
Fields§
§message_tx: IpcSender<TraceRequest>
Sender for FFI-mode-related requests.
confirm_rx: IpcReceiver<Confirmation>
Used for synchronisation, allowing us to receive confirmation that the
parent process has handled the request from message_tx
.
event_rx: IpcReceiver<MemEvents>
Receiver for memory acceses that ocurred during the FFI call.
Implementations§
Source§impl Supervisor
impl Supervisor
Sourcepub fn is_enabled() -> bool
pub fn is_enabled() -> bool
Returns true
if the supervisor process exists, and false
otherwise.
unsafe fn protect_pages( pages: impl Iterator<Item = (NonNull<u8>, usize)>, prot: ProtFlags, ) -> Result<(), Errno>
Sourcepub fn do_ffi<'tcx>(
alloc: &Rc<RefCell<IsolatedAlloc>>,
f: impl FnOnce() -> InterpResult<'tcx, ImmTy<'tcx>>,
) -> InterpResult<'tcx, (ImmTy<'tcx>, Option<MemEvents>)>
pub fn do_ffi<'tcx>( alloc: &Rc<RefCell<IsolatedAlloc>>, f: impl FnOnce() -> InterpResult<'tcx, ImmTy<'tcx>>, ) -> InterpResult<'tcx, (ImmTy<'tcx>, Option<MemEvents>)>
Performs an arbitrary FFI call, enabling tracing from the supervisor. As this locks the supervisor via a mutex, no other threads may enter FFI until this function returns.
Auto Trait Implementations§
impl !Freeze for Supervisor
impl !RefUnwindSafe for Supervisor
impl Send for Supervisor
impl !Sync for Supervisor
impl Unpin for Supervisor
impl UnwindSafe for Supervisor
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
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 16 bytes