rman.h

Go to the documentation of this file.
00001 /*
00002  *  Copyright 2013 by Texas Instruments Incorporated.
00003  *
00004  */
00005 
00006 /*
00007  * Copyright (c) 2012, Texas Instruments Incorporated
00008  * All rights reserved.
00009  *
00010  * Redistribution and use in source and binary forms, with or without
00011  * modification, are permitted provided that the following conditions
00012  * are met:
00013  *
00014  * *  Redistributions of source code must retain the above copyright
00015  *    notice, this list of conditions and the following disclaimer.
00016  *
00017  * *  Redistributions in binary form must reproduce the above copyright
00018  *    notice, this list of conditions and the following disclaimer in the
00019  *    documentation and/or other materials provided with the distribution.
00020  *
00021  * *  Neither the name of Texas Instruments Incorporated nor the names of
00022  *    its contributors may be used to endorse or promote products derived
00023  *    from this software without specific prior written permission.
00024  *
00025  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00026  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
00027  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00028  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
00029  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00030  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00031  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
00032  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
00033  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
00034  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
00035  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00036  *
00037  */
00055 #ifndef ti_sdo_fc_rman__RMAN_
00056 #define ti_sdo_fc_rman__RMAN_
00057 
00058 #define ti_sdo_fc_ires_NOPROTOCOLREV
00059 
00060 #ifdef __cplusplus
00061 extern "C" {
00062 #endif
00063 
00066 
00067 #include <ti/xdais/ires.h>
00068 #include <ti/sdo/fc/ires/iresman.h>
00069 
00078 #define RMAN_MODNAME  "ti.sdo.fc.rman"
00079 
00083 #define RMAN_GTNAME  "ti.sdo.fc.rman"
00084 
00088 #define RMAN_PROTOCOLNAMESIZE 200
00089 
00093 typedef struct Sem_Obj * RMAN_SemHandle;
00094 
00100 typedef IRES_YieldArgs (* ti_sdo_fc_rman_RMAN_YieldArgsFxn)
00101     (Int scratchId, Bool yieldFlag);
00102 
00113 typedef struct RMAN_Params {
00114 
00118     short numRegistries;
00119 
00123     IRESMAN_PersistentAllocFxn * allocFxn;
00124 
00128     IRESMAN_PersistentFreeFxn * freeFxn;
00129 
00134     IRES_YieldFxn yieldFxn;
00135 
00139     Bool yieldSamePriority;
00140 
00141 } RMAN_Params;
00142 
00146 extern __FAR__ RMAN_Params RMAN_PARAMS;
00147 
00151 extern __FAR__ IRESMAN_Fxns * RMAN_TABLE[];
00152 
00156 extern __FAR__ short RMAN_FREE_ENTRIES[];
00157 
00163 extern __FAR__ short RMAN_numRegistryEntries;
00164 
00170 extern __FAR__ IRESMAN_Fxns ** RMAN_registryEntries;
00171 
00176 extern __FAR__ IRESMAN_Params ** RMAN_registryResmanArgs;
00177 
00182 extern __FAR__ unsigned int ** RMAN_iresVTable;
00183 
00187 extern __FAR__ unsigned int ti_sdo_fc_rman_RMAN_MAXALGS;
00188 
00192 extern UInt32 ti_sdo_fc_rman_RMAN_ipcKey;
00193 
00198 extern ti_sdo_fc_rman_RMAN_YieldArgsFxn ti_sdo_fc_rman_RMAN_setYieldArgs;
00199 
00209 IRES_Status RMAN_init(Void);
00210 
00211 
00218 IRES_Status RMAN_exit(Void);
00219 
00220 
00237 IRES_Status RMAN_register(IRESMAN_Fxns * resmanFxns, IRESMAN_Params * initArgs);
00238 
00239 
00250 IRES_Status RMAN_unregister(IRESMAN_Fxns * resmanFxns);
00251 
00275 IRES_Status RMAN_assignResources(IALG_Handle algHandle, IRES_Fxns * resFxns,
00276     Int scratchGroupId);
00277 
00278 
00309 IRES_Status RMAN_allocateResources(Int requestId,
00310     IRES_ResourceDescriptor * resDesc, Int numResources, Int scratchGroupId);
00311 
00312 
00331 IRES_Status RMAN_freeResources(IALG_Handle algHandle, IRES_Fxns * resFxns, Int
00332     scratchGroupId);
00333 
00358 IRES_Status RMAN_freeAllocatedResources (Int requestId,
00359         IRES_ResourceDescriptor *resDesc, Int numResources, Int scratchGroupId);
00360 
00373 IRES_Status RMAN_activateResource(IALG_Handle algHandle,
00374     IRES_Handle resourceHandle, IRES_Fxns * resFxns, Int scratchGroupId);
00375 
00385 IRES_Status RMAN_activateAllResources(IALG_Handle algHandle,
00386     IRES_Fxns * resFxns, Int scratchGroupId);
00387 
00400 IRES_Status RMAN_deactivateResource(IALG_Handle algHandle,
00401     IRES_Handle resourceHandle, IRES_Fxns * resFxns, Int scratchGroupId);
00402 
00413 IRES_Status RMAN_deactivateAllResources(IALG_Handle algHandle,
00414     IRES_Fxns * resFxns, Int scratchGroupId);
00415 
00416 
00436 void RMAN_yield(IRES_YieldResourceType resource,
00437     IRES_YieldContextHandle algYieldContext, IRES_YieldArgs yieldArgs);
00438 
00439 
00442 #ifdef __cplusplus
00443 }
00444 #endif /* extern "C" */
00445 
00446 #endif
00447 /*
00448  *  @(#) ti.sdo.fc.rman; 2, 0, 0,1; 6-12-2013 19:58:01; /db/atree/library/trees/fc/fc-t09/src/ xlibrary
00449 
00450  */
00451 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Copyright 2013, Texas Instruments Incorporated