Specifies the algorithm specific handles and context save & restore function pointers and arguments that the framework will call during a context switch. More...
#include <ires.h>
Data Fields | |
IALG_Handle | algHandle |
IRES_Handle | resourceHandle |
IRES_ContextSaveFxn | contextSave |
IRES_ContextRestoreFxn | contextRestore |
Void * | contextArgs |
Specifies the algorithm specific handles and context save & restore function pointers and arguments that the framework will call during a context switch.
Handle of the algorithm instance issuing the "yield".
Optional resource handle that may be used to yield a particular IRES resource. May be NULL when some other resource or ALL resources associated with an algorithm are to be yielded.
The 'contextSave' function is implemented by the 'yielding' algorithm instance and must be called by the framework whenever the 'yield' results in a context switch. Any 'scratch' IRES, IALG or IDMA3 resource owned by the algorithm must be considered in volatile state during a 'yield' call, and must be re-initialized and activated following any context switch. The 'contextSave' function must save any volatile state information in its persistent memory that it needs in the subsequent 'contextRestore' function call to re-initialize and activate its scratch resources.
The 'contextRestore' function is implemented by the 'yielding' algorithm instance and must be called by the framework following a context switch which occured as a result of the 'yield', prior to returning from the framework supplied 'yield-function'.
Any 'scratch' IRES, IALG or IDMA3 resource owned by the algorithm must be considered in volatile state during a 'yield' call, and must be re-initialized and activated following any context swith. The 'contextRestore' function uses the saved context information in the preceeding 'contextSave' call to re-initialize and activate its scratch resources.
The arguments that must be passed when calling the 'contextSave()' and 'contextRestore()' functions. The algorithm instance calling the 'yield function' optionally supplies any 'contextArgs' that it wants the framework to passed to the 'contextSave()' and 'contextRestore()' functions.