SIM_current_processor — obsolete API function
#include <simics/device-api.h> // in C
// always available in DML
// only supported with SIMICS_API = 6
conf_object_t *
SIM_current_processor();
Returns the currently executing processor if the simulation is running, and nullptr otherwise.
In comparison to the previous Simics version the function returns
nullptrmore often. This includes but not limited to the cases when the function is invoked from script branches, callbacks passed to the SIM_run_alone API function and when used from the command line.
The object driving the simulation (implementing the execute interface) updates the current processor through the cell_inspection interface. The returned processor is an object implementing processor_info, and often also other interfaces such as int_register and step.
Note that code can usually get the processor tied to a specific action through a passed generic_transaction_t argument or a direct argument specifying the processor. In those cases, it is recommended that the passed information is used rather than relying on SIM_current_processor.
SimExc_Lookup Thrown if no processor exists.
Cell Context