User manual

88
// Failure – report error message here
}
}
// Set bus request and interrupt bus server (CPU) to process it
if(attention_object && brq_object) {
*brq_object |= brq_mask;
*attention_object = attention_value;
}
// Clear bus request as follows
if(brq_object) {
*brq_object &= ~brq_mask;
}
The example above shows that the CHARON core is not obliged to support the indicated
operations. It also indicates why the device instance should remember the chapi_in
descriptor.
4.9.12 Setup device bus requests
Setup device bus requests operation belongs to the class of operations called “Request to
setup bus requests”. The CHARON core initiates such an operation when the time to
setup bus requests achieved.
To perform the operation, the initiator invokes a routine identified by the setup_bus_requests
field of the chapi_out descriptor. The procedure is invoked as follows:
const chapi_out * co = …;
if (co->setup_bus_requests) {
co->setup_bus_requests (co);
}
The example above shows that the device is not obliged to support the indicated
operation.
4.9.13 Bus request acknowledge
Acknowledging the bus interrupt request is currently the only operation defined within the
group of operations called “Request for bus interrupt acknowledge”. The CHARON core
(one of the CPU instruction interpretation threads) initiates such an operation. The device
instance is defined as a target of the operation.
In order to perform the operation, the initiator invokes a routine identified by the brq_ack
parameter, supplied during the setup of corresponding bus request (). The procedure is
invoked as follows:
brq_acknowledge brq_ack = …;
if (brq_ack) {
vec = brq_ack (arg1, arg2);