User manual

51
transactions initiated by the CHARON core are processed by routines specified in the
chapi_out descriptor, and transactions initiated by the device instance are processed by
routines specified in the chapi_in descriptor. This is why a device instance must store the
data path to at least the chapi_in descriptor.
Both CHARON and the loadable component are allowed to omit (i.e. set to 0) some or all
entry points in the chapi_in and the chapi_out descriptors respectively. An entry point set
to zero is considered absent. An absent entry point for a certain operation means that the
operation is not supported and shall not be initiated by the counterpart.
2.6 Notes on threading
Any threading model maybe used in third party CHAPI device. The only restriction is to
follow the rules of calling CHAPI procedures – many of them require certain call conditions
(see 2.5, 3.4 for details). In general:
1) It is reasonable to perform any kind of I/O communication in one or a number of
separate backgroung threads depending on device specific;
2) It is reasonable to perform some kind of heavy calculations (packet processing for
network adapters, graphical processing for video adapters, etc) in a separate
dedicated background thread.