Next: , Previous: , Up: Functions   [Index]


3.4.7 Extended Execution Context

Some functions will use more information with regard to the call context and specifics than just the per function execution context. The extended context information will be available in the form of a vector pointed by the pointer before the first in the input array.

Function ‘method23’ accesses the extended context as:

int
method23(void *context, void *output, void **input)
{
    void **extended;

    extended = input[-1];

    -extended- is the extended execution context
}

The extended context vector may point records such as:

See Extended Execution Context Definitions.

libaime makes the extended context vector available for every called function. Applications may choose not to make it available, if they have knowledge that the called functions do not require it.

The extended context vector is an object, a different array of pointers will not do. Applications supplying the extended context vector to called functions need to refer the one object that pertains the current program execution.

For procedural programs, the extended context vector changes with the called aime functions, for non procedural programs it stays the same.

The extended execution context may be used (by the application for an instance) to identify the failed function call when an error has occurred.


Next: Variadic Functions, Previous: Per Function Execution Context, Up: Functions   [Index]