rman.h

Go to the documentation of this file.
00001 /* 
00002  * Copyright (c) 2011, Texas Instruments Incorporated
00003  * All rights reserved.
00004  *
00005  * Redistribution and use in source and binary forms, with or without
00006  * modification, are permitted provided that the following conditions
00007  * are met:
00008  *
00009  * *  Redistributions of source code must retain the above copyright
00010  *    notice, this list of conditions and the following disclaimer.
00011  *
00012  * *  Redistributions in binary form must reproduce the above copyright
00013  *    notice, this list of conditions and the following disclaimer in the
00014  *    documentation and/or other materials provided with the distribution.
00015  *
00016  * *  Neither the name of Texas Instruments Incorporated nor the names of
00017  *    its contributors may be used to endorse or promote products derived
00018  *    from this software without specific prior written permission.
00019  *
00020  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00021  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
00022  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00023  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
00024  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00025  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00026  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
00027  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
00028  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
00029  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
00030  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00031  * 
00032  */
00050 #ifndef ti_sdo_fc_rman__RMAN_
00051 #define ti_sdo_fc_rman__RMAN_
00052 
00053 #define ti_sdo_fc_ires_NOPROTOCOLREV
00054 
00055 #ifdef __cplusplus
00056 extern "C" {
00057 #endif
00058 
00061 
00062 #include <ti/xdais/ires.h>
00063 #include <ti/sdo/fc/ires/iresman.h>
00064 
00073 #define RMAN_MODNAME  "ti.sdo.fc.rman"
00074 
00078 #define RMAN_GTNAME  "ti.sdo.fc.rman"
00079 
00083 #define RMAN_PROTOCOLNAMESIZE 200
00084 
00088 typedef struct Sem_Obj * RMAN_SemHandle;
00089 
00090 
00101 typedef struct RMAN_Params {
00102 
00106     short numRegistries;
00107 
00111     IRESMAN_PersistentAllocFxn * allocFxn;
00112 
00116     IRESMAN_PersistentFreeFxn * freeFxn;
00117 
00121     IRES_YieldFxn yieldFxn;
00122 
00126     Bool yieldSamePriority;
00127 
00128 } RMAN_Params;
00129 
00133 extern __FAR__ RMAN_Params RMAN_PARAMS;
00134 
00138 extern __FAR__ IRESMAN_Fxns * RMAN_TABLE[];
00139 
00143 extern __FAR__ short RMAN_FREE_ENTRIES[];
00144 
00150 extern __FAR__ short RMAN_numRegistryEntries;
00151 
00157 extern __FAR__ IRESMAN_Fxns ** RMAN_registryEntries;
00158 
00163 extern __FAR__ IRESMAN_Params ** RMAN_registryResmanArgs;
00164 
00169 extern __FAR__ unsigned int ** RMAN_iresVTable;
00170 
00171 
00181 IRES_Status RMAN_init(Void);
00182 
00183 
00190 IRES_Status RMAN_exit(Void);
00191 
00192 
00209 IRES_Status RMAN_register(IRESMAN_Fxns * resmanFxns, IRESMAN_Params * initArgs);
00210 
00211 
00222 IRES_Status RMAN_unregister(IRESMAN_Fxns * resmanFxns);
00223 
00247 IRES_Status RMAN_assignResources(IALG_Handle algHandle, IRES_Fxns * resFxns,
00248     Int scratchGroupId);
00249 
00250 
00281 IRES_Status RMAN_allocateResources(Int requestId,
00282     IRES_ResourceDescriptor * resDesc, Int numResources, Int scratchGroupId);
00283         
00284 
00303 IRES_Status RMAN_freeResources(IALG_Handle algHandle, IRES_Fxns * resFxns, Int
00304     scratchGroupId);
00305 
00330 IRES_Status RMAN_freeAllocatedResources (Int requestId,
00331         IRES_ResourceDescriptor *resDesc, Int numResources, Int scratchGroupId);
00332         
00345 IRES_Status RMAN_activateResource(IALG_Handle algHandle,
00346     IRES_Handle resourceHandle, IRES_Fxns * resFxns, Int scratchGroupId);
00347 
00357 IRES_Status RMAN_activateAllResources(IALG_Handle algHandle,
00358     IRES_Fxns * resFxns, Int scratchGroupId);
00359 
00372 IRES_Status RMAN_deactivateResource(IALG_Handle algHandle,
00373     IRES_Handle resourceHandle, IRES_Fxns * resFxns, Int scratchGroupId);
00374 
00385 IRES_Status RMAN_deactivateAllResources(IALG_Handle algHandle,
00386     IRES_Fxns * resFxns, Int scratchGroupId);
00387 
00388 
00408 void RMAN_yield(IRES_YieldResourceType resource,
00409     IRES_YieldContextHandle algYieldContext, IRES_YieldArgs yieldArgs);
00410 
00411 
00414 #ifdef __cplusplus
00415 }
00416 #endif /* extern "C" */
00417 
00418 #endif
00419 /*
00420  *  @(#) ti.sdo.fc.rman; 2, 0, 0,305; 3-1-2011 18:59:38; /db/atree/library/trees/fc/fc-n29x/src/ xlibrary
00421 
00422  */
00423 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Copyright 2011, Texas Instruments Incorporated