ras_callback Registered Callback

Purpose

Component callback registered through the ras_register kernel service.

Syntax

kerrno_t (*ras_callback)(
              ras_block_t ras_blk,
              ras_cmd_t command,
              void *arg
              void *private_data);

Description

The component trace framework calls the ras_callback function each time an external event modifies a property of the component. Each component that calls the ras_register kernel service with a non-zero flags parameter must have the ras_callback registered callback function. Valid callback commands are those defined for individual RAS domains, such as Component Trace.

Note that the callback for a particular component does not have to be aware of, or act on, the children of the component as they have their own callbacks. Callbacks, in general, only do things relevant to the component for which they were called.

Parameters

Item Description
ras_blk The target control block pointer.
command The command to act on. Commands are specific to a given RAS domain, such as Component Trace.
arg Optional pointer to an argument needed for the given command.
private_data Pointer to component-private data, specifically the pointer registered in the ras_register kernel service.

Return Values

ras_callback return 0 for success. Any other return value is a diagnostic error code from the component.

Execution Environment

Registrants must be aware that certain callbacks can be used at less than the interrupt priority of INTBASE, depending on what RAS domains the component is registered for. This depends on the designs for the domains involved. Because of the variability here, callbacks should be defined in a pinned object file.