Function simics::api::base::conf_object::get_interface

source ·
pub fn get_interface<I>(obj: *mut ConfObject) -> Result<I>
where I: Interface,
Expand description

Get an interface on an object

§Arguments

  • obj - The object to get an interface on

§Return Value

The interface requested, or an error if invalid.

§Performance

  • SIM_get_interface - Calls [SIM_object_class] which is extremely cheap ((&obj->sobj)->isa) then canonicalizes (replace - with _) the interface name, then does a hashtable lookup with the interface name. This shouldn’t be called in an extreme tight loop (e.g. each instruction) but is OK to call on rarer events (e.g. on magic instructions).

§Context

All Contexts