ReXGlue SDK
Loading...
Searching...
No Matches
rex::IGuestInterrupts Class Referenceabstract

#include <rex/guest.h>

Public Member Functions

virtual Result< void > RaiseGraphicsInterrupt (u32 source, u32 cpu)=0
virtual Result< ScopeGuard > StartHostThread (std::string_view name, MoveOnlyFunction< void(std::stop_token)> fn)=0

Detailed Description

Raises graphics interrupts into the title from host threads.

Member Function Documentation

◆ RaiseGraphicsInterrupt()

virtual Result< void > rex::IGuestInterrupts::RaiseGraphicsInterrupt ( u32 source,
u32 cpu )
nodiscardpure virtual

Calls the title's interrupt callback on the calling thread, or does nothing until it sets one.

Parameters
sourceThe interrupt source, such as vblank or a command processor event.
cpuThe target guest CPU.
Returns
Ok, or an error when the calling thread did not come from StartHostThread.

◆ StartHostThread()

virtual Result< ScopeGuard > rex::IGuestInterrupts::StartHostThread ( std::string_view name,
MoveOnlyFunction< void(std::stop_token)> fn )
nodiscardpure virtual

Starts a host thread that may call into the title, such as RaiseGraphicsInterrupt.

Parameters
fnThe thread body, which returns when the stop token is requested.
Returns
The guard, destroyed to stop and join the thread.

The documentation for this class was generated from the following file: