SIM_add_global_notifier — add a global notifier callback
#include <simics/device-api.h> // in C
// always available in DML
global_notifier_callback_t *
SIM_add_global_notifier(
global_notifier_type_t type,
conf_object_t *subscriber,
void (*callback)(conf_object_t *subscriber, lang_void *data),
lang_void *data);
import simics
simics.SIM_add_global_notifier(...)
SIM_add_global_notifier installs a callback on the global notifier of type type. The callback will be executed in Global Context. The callback can uninstall itself, using SIM_delete_global_notifier, but must not uninstall any other global notifiers.
The subscriber argument should be the object listening on the notifier; this object is passed as the first argument to the callback. The installed callback is automatically removed if the subscriber object is deleted. It is legal to pass NULL in the subscriber argument if there is no object associated with the callback.
The function returns a handle to the installed callback or NULL if the notifier type is unknown.
Adding a notifier callback from another notifier callback of the same notifier type does not trigger an immediate callback invocation.
Global Context
SIM_add_global_notifier_once — add a global notifier callback
#include <simics/device-api.h> // in C
// always available in DML
global_notifier_callback_t *
SIM_add_global_notifier_once(
global_notifier_type_t type,
conf_object_t *subscriber,
void (*callback)(conf_object_t *subscriber, lang_void *data),
lang_void *data);
import simics
simics.SIM_add_global_notifier_once(...)
The SIM_add_global_notifier_once is similar to SIM_add_global_notifier, except that the notifier will be removed automatically after the callback has been called once.
Global Context
SIM_delete_global_notifier — delete global notifier callback
#include <simics/device-api.h> // in C
// always available in DML
void
SIM_delete_global_notifier(global_notifier_callback_t *handle);
import simics
simics.SIM_delete_global_notifier(...)
SIM_delete_global_notifier deletes the global notifier callback specified by the handle handle.
Global notifier callbacks are deleted automatically when the subscribing object is deleted.
Deleting a notifier callback from another notifier callback of the same notifier type may or may not inhibit the last invocation of the deleted callback; this is undefined.
Global Context