Type Alias simics_api_sys::transaction_completion_t

source ·
pub type transaction_completion_t = Option<unsafe extern "C" fn(obj: *mut conf_object_t, t: *mut transaction_t, ex: exception_type_t) -> exception_type_t>;
Expand description
transaction_completion_t transaction_completion_t transaction_completion_t Callback invoked when an asynchronous transaction is completed. The callback is stored in a completion atom belonging to the transaction t. Similarly, obj is an object stored in either an owner atom or an initiator atom. The former takes precedence if both are present.

Completion callbacks are only invoked for transactions monitored with either SIM_monitor_transaction or SIM_monitor_chained_transaction, or for transactions deferred with SIM_defer_owned_transaction.

The completion status for the operation is given in the

ex argument, and is usually equal to Sim_PE_No_Exception.

The return value of the callback is the completion status for the transaction t. This status is used to complete the parent transaction if the transaction is being monitored with SIM_monitor_chained_transaction. The return value is also returned by SIM_monitor_transaction or SIM_monitor_chained_transaction when a transaction is completed synchronously.

If the callback returns Sim_PE_Deferred, then the transaction t is left uncompleted. It must then be completed later on by an explicit call to SIM_complete_transaction.

Aliased Type§

enum transaction_completion_t {
    None,
    Some(unsafe extern "C" fn(_: *mut conf_object, _: *mut transaction, _: exception_type_t) -> exception_type_t),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C" fn(_: *mut conf_object, _: *mut transaction, _: exception_type_t) -> exception_type_t)

Some value of type T.