trait EvalContextPrivExt<'tcx>: MiriInterpCxExt<'tcx> {
// Provided methods
fn run_on_stack_empty(&mut self) -> InterpResult<'tcx, Poll<()>> { ... }
fn schedule(&mut self) -> InterpResult<'tcx, SchedulingAction> { ... }
fn is_thread_blocked_on_host(&self, thread: &Thread<'tcx>) -> bool { ... }
fn poll_and_unblock(
&mut self,
timeout: Option<Duration>,
) -> InterpResult<'tcx> { ... }
fn unblock_expired_timeouts(
&mut self,
) -> InterpResult<'tcx, Option<Duration>> { ... }
}Provided Methods§
fn run_on_stack_empty(&mut self) -> InterpResult<'tcx, Poll<()>>
Sourcefn schedule(&mut self) -> InterpResult<'tcx, SchedulingAction>
fn schedule(&mut self) -> InterpResult<'tcx, SchedulingAction>
Decide which action to take next and on which thread.
The currently implemented scheduling policy is the one that is commonly used in stateless model checkers such as Loom: run the active thread as long as we can and switch only when we have to (the active thread was blocked, terminated, or has explicitly asked to be preempted).
If GenMC mode is active, the scheduling is instead handled by GenMC.
Sourcefn is_thread_blocked_on_host(&self, thread: &Thread<'tcx>) -> bool
fn is_thread_blocked_on_host(&self, thread: &Thread<'tcx>) -> bool
Check whether the provided thread is currently blocked on host I/O. This means, it’s either blocked on an I/O operation directly or it’s blocked on an epoll instance which contains a host source interest.
Sourcefn poll_and_unblock(&mut self, timeout: Option<Duration>) -> InterpResult<'tcx>
fn poll_and_unblock(&mut self, timeout: Option<Duration>) -> InterpResult<'tcx>
Poll for I/O events until either an I/O event happened or the timeout expired.
The different timeout values are described in BlockingIoManager::poll.
Unblocks all threads which are blocked on I/O and whose I/O interests are currently fulfilled.
Sourcefn unblock_expired_timeouts(&mut self) -> InterpResult<'tcx, Option<Duration>>
fn unblock_expired_timeouts(&mut self) -> InterpResult<'tcx, Option<Duration>>
Find all threads with expired timeouts, unblock them and execute their timeout callbacks.
This method returns the minimum duration until the next thread timeout expires.
If all ready threads have no timeout set, None is returned.