User manual
91
To perform the operation, the initiator invokes a routine identified by the fun argument
previously supplied in the corresponding request for synchronizing execution to the CPU
instruction interpretation thread(s). The initiator provides in the arg1 and the arg2
arguments additional parameters previously supplied together with the fun argument
requesting for synchronizing execution to the CPU instruction interpretation thread(s). The
procedure is invoked as follows:
ast_handler fun = …;
if (fun) {
fun(arg1, arg2);
}
The example above shows that the device is not obliged to support the indicated
operation. It is allowed to supply 0 for the fun parameter when requesting synchronizing
execution with the CPU instruction interpretation thread(s). Note that the CHAPI defines
additional parameters supplied through the arg1 and the arg2 arguments to help the target
dispatching requests.
The device shall consider the synchronized invocation request as a reaction of the CPU
instruction interpretation thread of the CHARON core to the previously issued request for
“Synchronizing execution”.
The CHAPI guarantees that the procedure identified by the fun argument is invoked in the
execution context synchronized with the CPU instruction interpretation thread.
4.14 Delaying synchronized execution
Delaying synchronized (with the CPU instruction interpretation thread) execution belongs
to the “Synchronization request” class of operations. Such an operation is initiated by the
device instance. The CHARON core is defined as a target of the operation. More precisely
the CPU instruction interpretation thread is required to respond to the operation.
To perform the operation, the initiator invokes a routine identified by the put_sst field of the
chapi_in descriptor. The initiator provides in the delay argument a number of CPU
instructions to interpret, in the fun argument an entry point to the procedure to be
synchronized with the CPU instruction interpretation thread after the specified number of
CPU instructions are interpreted (“delay” parameter), and in the arg1 and the arg2
arguments additional parameters to be passed later on to that procedure. The put_sst
routine is invoked as follows:
const chapi_in * ci = …;
if (ci->put_sst) {
ci->put_sst(ci, delay, fun, arg1, arg2);
}
The example above shows that the CHARON core is not obliged to support the indicated
operation. Also it gives an indication why the device instance is supposed to remember
the chapi_in descriptor.










