Data Structures | |
struct | RMAN_Params |
The module configuration structure for RMAN. It is set at design time by the system integrator to register the specific Resource Managers(IRESMAN implementations). More... | |
struct | RMAN_YieldArgs |
Yield Arguments passed to the algorithm if RMAN's useDSKT2 flag is set. These arguments are used by the yield function set/get context and release/acquire locks for a particular scratch group. More... | |
Defines | |
#define | RMAN_GTNAME "ti.sdo.fc.rman" |
Name used to identify the GT module. | |
#define | RMAN_PROTOCOLNAMESIZE 200 |
Size of the Protocol Name in the Resource Registry Table. | |
Typedefs | |
typedef struct Sem_Obj * | RMAN_SemHandle |
Declare abstract handle for Semaphore object. | |
Functions | |
IRES_Status | RMAN_init (Void) |
Initialize the RMAN object with static information from the headers/configuration etc. This function has to return successfully before the other APIs are called. | |
IRES_Status | RMAN_exit (Void) |
Delete the generic IRES RMAN and release memory back. | |
IRES_Status | RMAN_register (IRESMAN_Fxns *resmanFxns, IRESMAN_Params *initArgs) |
Register the IRESMAN protocol/protocol revision i.e., device specific resource manager implementation with the Resource Registry of RMAN. RMAN logs these entries in an internal table that is uses to satisfy requests for different IRES resources. | |
IRES_Status | RMAN_unregister (IRESMAN_Fxns *resmanFxns) |
Unregisters the protocol and the corresponding resource manager implementation from RMAN's Resource Registry. This API is called when this resource no longer needs to be managed by RMAN. | |
IRES_Status | RMAN_assignResources (IALG_Handle algHandle, IRES_Fxns *resFxns, Int scratchGroupId) |
Assign IRES resources to the algorithm indicated by algHandle. Algorithm could request multiple IRES resources of same/ different type through its IRES implementation. RMAN would identify which IRESMAN implementation (that is registered with it) to query and then request resources from that, to satisfy the individual IRES requests. Non-algorithm users of this API can obtain resources by passing * NULL as the algHandle. Resources will still be assigned to the IRES_Fxns::initResources API. | |
IRES_Status | RMAN_freeResources (IALG_Handle algHandle, IRES_Fxns *resFxns, Int scratchGroupId) |
Free resources held by the algorithm resource handle. | |
IRES_Status | RMAN_activateResource (IALG_Handle algHandle, IRES_Handle resourceHandle, IRES_Fxns *resFxns, Int scratchGroupId) |
Activate resource identified by the resourceHandle held by the algorithm. | |
IRES_Status | RMAN_activateAllResources (IALG_Handle algHandle, IRES_Fxns *resFxns, Int scratchGroupId) |
Activate all resources held by the algorithm. | |
IRES_Status | RMAN_deactivateResource (IALG_Handle algHandle, IRES_Handle resourceHandle, IRES_Fxns *resFxns, Int scratchGroupId) |
Deactivate resource identified by the resourceHandle held by the algorithm. | |
IRES_Status | RMAN_deactivateAllResources (IALG_Handle algHandle, IRES_Fxns *resFxns, Int scratchGroupId) |
Deactivate all resources held by the algorithm. | |
void | RMAN_yield (IRES_YieldResourceType resource, IRES_YieldContextHandle algYieldContext, IRES_YieldArgs yieldArgs) |
Yield function specifically for use when DSKT2 based algorithms need cooperative preemption and multi-tasking support This function is called by the algorithm at pre-determined points during its execution, to allow another algorithm of same, or higher prioirty to preempt its execution. | |
Variables | |
__FAR__ RMAN_Params | RMAN_PARAMS |
__FAR__ IRESMAN_Fxns * | RMAN_TABLE [] |
__FAR__ short | RMAN_FREE_ENTRIES [] |
__FAR__ short | RMAN_numRegistryEntries |
__FAR__ IRESMAN_Fxns ** | RMAN_registryEntries |
__FAR__ IRESMAN_Params ** | RMAN_registryResmanArgs |
IRES generic Resource Manager RMAN Definitions - Generic Resource Manager that manages resource allocation for algorithms that implement the IRES interface
#define RMAN_GTNAME "ti.sdo.fc.rman" |
Name used to identify the GT module.
#define RMAN_PROTOCOLNAMESIZE 200 |
Size of the Protocol Name in the Resource Registry Table.
typedef struct Sem_Obj* RMAN_SemHandle |
Declare abstract handle for Semaphore object.
IRES_Status RMAN_init | ( | Void | ) |
Initialize the RMAN object with static information from the headers/configuration etc. This function has to return successfully before the other APIs are called.
IRES_OK | IRES RMAN created successfully | |
IRES_ENORESOURCE | One of the calls to the device specific Resource Manager failed |
IRES_Status RMAN_exit | ( | Void | ) |
Delete the generic IRES RMAN and release memory back.
IRES_OK | IRES RMAN exited successfully | |
IRES_EFAIL | Error closing device specific RESMAN |
IRES_Status RMAN_register | ( | IRESMAN_Fxns * | resmanFxns, | |
IRESMAN_Params * | initArgs | |||
) |
Register the IRESMAN protocol/protocol revision i.e., device specific resource manager implementation with the Resource Registry of RMAN. RMAN logs these entries in an internal table that is uses to satisfy requests for different IRES resources.
[in] | resmanFxns | Device-specific implementation of the IRESMAN interfaces |
[in] | initArgs | Arguments to the initialization interface of the RESMAN interfaces |
IRES_OK | Registered successfully | |
IRES_EEXISTS | Protocol already exists | |
IRES_ENORESOURCE | Device specific Resman failed to initialize Resource Manager failed | |
IRES_EFAIL | Error closing device specific RESMAN |
IRES_Status RMAN_unregister | ( | IRESMAN_Fxns * | resmanFxns | ) |
Unregisters the protocol and the corresponding resource manager implementation from RMAN's Resource Registry. This API is called when this resource no longer needs to be managed by RMAN.
[in] | resmanFxns | Device-specific implementation of the RESMAN interfaces |
IRES_OK | Unregistered successfully | |
IRES_ENOTFOUND | Entry not found in the RMAN Table | |
IRES_EFAIL | Error closing device specific RESMAN |
IRES_Status RMAN_assignResources | ( | IALG_Handle | algHandle, | |
IRES_Fxns * | resFxns, | |||
Int | scratchGroupId | |||
) |
Assign IRES resources to the algorithm indicated by algHandle. Algorithm could request multiple IRES resources of same/ different type through its IRES implementation. RMAN would identify which IRESMAN implementation (that is registered with it) to query and then request resources from that, to satisfy the individual IRES requests. Non-algorithm users of this API can obtain resources by passing * NULL as the algHandle. Resources will still be assigned to the IRES_Fxns::initResources API.
[in] | algHandle | Handle to the algorithm |
[in] | resFxns | Handle to the IRES implementation |
[in] | scratchGroupId | Id of the scratch group in which resources are requested from -1 if persistent resources are requested. Note: If performing cooperative preemption, use the same scratchGroupId * to request resources and to create algorithm. Failure to do so, will lead to unexpected behaviour. |
IRES_OK | Resources assigned successfully | |
IRES_EALG | One of the calls to the IRES interfaces of the algorithm failed | |
IRES_ENOMEM | Not enough memory | |
IRES_ENOTFOUND | Entry not found | |
IRES_ENORESOURCE | Resources unavailable | |
IRES_EFAIL | Error freeing handles etc |
IRES_Status RMAN_freeResources | ( | IALG_Handle | algHandle, | |
IRES_Fxns * | resFxns, | |||
Int | scratchGroupId | |||
) |
Free resources held by the algorithm resource handle.
[in] | algHandle | Handle to the algorithm, could be NULL for non-algorithm requests. |
[in] | resFxns | Handle to the IRES implementation |
[in] | scratchGroupId | Id of the scratch group in which resources were requested -1 if persistent resources are requested |
IRES_OK | Resources freed successfully | |
IRES_EALG | One of the calls to the IRES interfaces of the algorithm failed | |
IRES_ENOMEM | Not enough memory | |
IRES_ENOTFOUND | Entry not found | |
IRES_ENORESOURCE | Error obtaining resource information | |
IRES_EFAIL | Error freeing handles etc | |
IRES_ENOMEM | Out of memory |
IRES_Status RMAN_activateResource | ( | IALG_Handle | algHandle, | |
IRES_Handle | resourceHandle, | |||
IRES_Fxns * | resFxns, | |||
Int | scratchGroupId | |||
) |
Activate resource identified by the resourceHandle
held by the algorithm.
[in] | algHandle | Handle to the algorithm |
[in] | resourceHandle | Handle to the resource |
[in] | resFxns | Handle to the IRES implementation |
[in] | scratchGroupId | Id of the scratch group in which resources are requested from |
IRES_OK | Resource activated successfully |
IRES_Status RMAN_activateAllResources | ( | IALG_Handle | algHandle, | |
IRES_Fxns * | resFxns, | |||
Int | scratchGroupId | |||
) |
Activate all resources held by the algorithm.
[in] | algHandle | Handle to the algorithm |
[in] | resFxns | Handle to the IRES implementation |
[in] | scratchGroupId | Id of the scratch group in which resources are requested from |
IRES_OK | All resources activated successfully |
IRES_Status RMAN_deactivateResource | ( | IALG_Handle | algHandle, | |
IRES_Handle | resourceHandle, | |||
IRES_Fxns * | resFxns, | |||
Int | scratchGroupId | |||
) |
Deactivate resource identified by the resourceHandle
held by the algorithm.
[in] | algHandle | Handle to the algorithm |
[in] | resourceHandle | Handle to the resource |
[in] | resFxns | Handle to the IRES implementation |
[in] | scratchGroupId | Id of the scratch group in which resources are requested from |
IRES_OK | Resource deactivated successfully |
IRES_Status RMAN_deactivateAllResources | ( | IALG_Handle | algHandle, | |
IRES_Fxns * | resFxns, | |||
Int | scratchGroupId | |||
) |
Deactivate all resources held by the algorithm.
[in] | algHandle | Handle to the algorithm |
[in] | resFxns | Handle to the IRES implementation |
[in] | scratchGroupId | Id of the scratch group in which resources are requested from |
IRES_OK | Resources deactivated successfully |
void RMAN_yield | ( | IRES_YieldResourceType | resource, | |
IRES_YieldContextHandle | algYieldContext, | |||
IRES_YieldArgs | yieldArgs | |||
) |
Yield function specifically for use when DSKT2 based algorithms need cooperative preemption and multi-tasking support This function is called by the algorithm at pre-determined points during its execution, to allow another algorithm of same, or higher prioirty to preempt its execution.
[in] | resource | Enum identifying type of resource (ALL, Scratch Memory, Scratch DMA, IRES Resource) |
[in] | algYieldContext | Handle to the yield context that contains information supplied by the algorithm including the algorithm handle, the corresponding context save/restore fxns and arguments with which to call these fxns. |
[in] | yieldArgs | Framework supplied yield arguments that are passed to the algorithm at the time of granting resource handles. These should be passed back unmodified to this function. |
__FAR__ RMAN_Params RMAN_PARAMS |
__FAR__ IRESMAN_Fxns* RMAN_TABLE[] |
__FAR__ short RMAN_FREE_ENTRIES[] |
__FAR__ short RMAN_numRegistryEntries |
__FAR__ IRESMAN_Fxns** RMAN_registryEntries |
__FAR__ IRESMAN_Params** RMAN_registryResmanArgs |