Appearance
API
cpp
#include <VAmiga.h>cpp
class APIDefined in VAmiga.h:83
Base class of all APIs.
Public Methods
| Return | Name | Description |
|---|---|---|
API inline | Creates an API object that operates on the given emulator. | |
void | suspend const | Suspends the emulator thread. |
void | resume const | Resumes the emulator thread after a call to suspend(). |
API
inline
cpp
inline API(Emulator * emu)Defined in VAmiga.h:97
Creates an API object that operates on the given emulator.
suspend
const
cpp
void suspend() constDefined in VAmiga.h:114
Suspends the emulator thread.
Blocks until the emulator thread has stopped at a safe point, i.e., it is neither computing a frame nor processing its command queue. The call can be nested: the thread continues once resume() has been called as often as suspend(). Use it to read or modify the state of a component that is not protected by the API itself.
Only one thread can hold a suspension at a time. Another thread that calls suspend(), or a blocking API function that waits for the emulator thread, waits until the holder has resumed the emulator. The holder itself must not call such a function, because it would wait for itself: they throw a CoreError, and so does halt(). Do not call suspend() from the emulator thread.
resume
const
cpp
void resume() constDefined in VAmiga.h:118
Resumes the emulator thread after a call to suspend().
Protected Attributes
| Return | Name | Description |
|---|---|---|
class Emulator * | emu | Pointer to the emulator instance this API object operates on. |
emu
cpp
class Emulator * emu = nullptrDefined in VAmiga.h:91
Pointer to the emulator instance this API object operates on.