Register a callback function to invoke when the guest executes a special instruction
Synopsis:
#include <qvm/guest.h>
int guest_instr_register(vdev_t *vdp,
enum guest_instr_type git,
unsigned qualifier,
guest_instr_callback_func_t *func)
Arguments:
- vdp
- A pointer to an associated vdev.
- git
- A guest instruction type (can be ORed with GIT_FLAG_NO_QUALIFIER).
- qualifier
- The guest instruction qualification; ignored if GIT_FLAG_NO_QUALIFIER is used in git).
- func
- A pointer to the function to invoke.
Library:
Provided by qvm; no external library is required.
Returns:
EOK if registration worked; otherwise, an error code.