IRES


Detailed Description

The IRES interface enables algorithms to request and receive handles representing private logical resources.


Data Structures

struct  IRES_YieldContext
 Specifies the algorithm specific handles and context save & restore function pointers and arguments that the framework will call during a context switch. More...
struct  IRES_Fxns
 These fxns are used to query/grant the resources requested by the algorithm at initialization time, and to change these resources at runtime. All these fxns are implemented by the algorithm, and called by the client of the algorithm. More...
enum  IRES_Status {
  IRES_OK = 0,
  IRES_EALG = 1,
  IRES_EEXISTS = 2,
  IRES_EFAIL = 3,
  IRES_EINIT = 4,
  IRES_ENOINIT = 5,
  IRES_ENOMEM = 6,
  IRES_ENORESOURCE = 7,
  IRES_ENOTFOUND = 8
}
 IRES_Status defines the standard error and success codes returned by IRES APIs. More...
enum  IRES_RequestMode {
  IRES_SCRATCH,
  IRES_PERSISTENT
}
 Mode in which resources can be requested. More...
typedef IRES_ObjIRES_Handle
 Handle to "logical" resource.

Typedefs

typedef Void(*) IRES_ContextSaveFxn (IALG_Handle algHandle, Void *contextArgs)
typedef Void(*) IRES_ContextRestoreFxn (IALG_Handle algHandle, Void *contextArgs)
typedef IRES_YieldContextIRES_YieldContextHandle
typedef Void * IRES_YieldArgs
typedef Void(*) IRES_YieldFxn (IRES_YieldResourceType resourceType, IRES_YieldContextHandle algYieldContext, IRES_YieldArgs yieldArgs)
 The 'yield function' pointer and 'yield arguments' are supplied to an algorithm during its IRES interface 'initialization'. The algorithm optionally calls the yield function during its 'process' stages for co-operative multi-tasking and pre-emption by a higher priority algorithm.

Enumerations

enum  IRES_YieldResourceType {
  IRES_ALL = 0,
  IRES_SCRATCHMEMORY,
  IRES_SCRATCHDMA,
  IRES_RESOURCEHANDLE
}


Typedef Documentation

typedef Void(*) IRES_ContextSaveFxn(IALG_Handle algHandle, Void *contextArgs)

typedef Void(*) IRES_ContextRestoreFxn(IALG_Handle algHandle, Void *contextArgs)

typedef IRES_YieldContext* IRES_YieldContextHandle

typedef Void* IRES_YieldArgs

typedef Void(*) IRES_YieldFxn(IRES_YieldResourceType resourceType, IRES_YieldContextHandle algYieldContext, IRES_YieldArgs yieldArgs)

The 'yield function' pointer and 'yield arguments' are supplied to an algorithm during its IRES interface 'initialization'. The algorithm optionally calls the yield function during its 'process' stages for co-operative multi-tasking and pre-emption by a higher priority algorithm.

An operating system level context switch may occur during the yield call. Whenever a context switch occurs, all scratch resources owned by the yielding algorithm must be context saved prior to the context switch and restored and initialized prior to 'resumption' by the framework/application. The 'yielding' algorithm must supply the IRES_YieldContext and the 'yield arguments' it received during IRES initialization. The framework calls the context save & restore functions provided by the yielding algorithm's IRES_YieldContext.

typedef struct IRES_Obj* IRES_Handle

Handle to "logical" resource.


Enumeration Type Documentation

enum IRES_YieldResourceType

Enumerator:
IRES_ALL  Yielding all resources held by the algorithm.
IRES_SCRATCHMEMORY  Yielding all scratch memory resources held by the algorithm.
IRES_SCRATCHDMA  Yielding all IDMA3 resources held by the algorithm.
IRES_RESOURCEHANDLE  Yielding IRES resource handle only.

enum IRES_Status

IRES_Status defines the standard error and success codes returned by IRES APIs.

Enumerator:
IRES_OK  Success
IRES_EALG  Error in algorithm IRES_Fxns functions
IRES_EEXISTS  Error, already exists
IRES_EFAIL  Generic Error Message
IRES_EINIT  Error, already initialized
IRES_ENOINIT  Error, not initialized
IRES_ENOMEM  Error, not enough memory
IRES_ENORESOURCE  Error, resource unavailable
IRES_ENOTFOUND  Error, not found

enum IRES_RequestMode

Mode in which resources can be requested.

Enumerator:
IRES_SCRATCH  Indicates that resource requested can be shared with other algorithms in the same group.
IRES_PERSISTENT  Indicates that resource requested for allocation exclusively for this algorithm.


Copyright 2009, Texas Instruments Incorporated