CERuntime.h

Go to the documentation of this file.
00001 /* 
00002  * Copyright (c) 2010, 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  */
00033 /*
00034  *  ======== ti/sdo/ce/CERuntime.h ========
00035  */
00036 
00047 #ifndef CERuntime_
00048 #define CERuntime_
00049 
00050 #ifdef __cplusplus
00051 extern "C" {
00052 #endif
00053 
00056 
00057 #include <ti/sdo/ce/Engine.h>
00058 
00059 /*
00060  *  Macros for runtime configuration
00061  */
00062 
00063 
00064 /* Define this symbol so alg table for an engine can be NULL */
00065 #define CE_NULL_algs NULL
00066 
00067 /*
00068  *  ======== CE_DECLARE_TYPE ========
00069  */
00099 #define CE_DECLARE_TYPE(name, types)         \
00100                                              \
00101 static String typeTab_##name [] = {          \
00102     types,                                   \
00103     NULL                                     \
00104 };                                           \
00105                                              \
00106 /*
00107  *  ======== CE_LOCAL_ALG ========
00108  */
00109 
00143 #define CE_LOCAL_ALG(name, algName, ialgFxns, idma3Fxns, iresFxns, groupId, \
00144                      memType) \
00145                                              \
00146     { algName,        /* name */             \
00147       {0},            /* uuid */             \
00148       ialgFxns,       /* ialgFxns */         \
00149       idma3Fxns,      /* idma3Fxns */        \
00150       typeTab_##name, /* typeTab */          \
00151       TRUE,           /* isLocal */          \
00152       groupId,        /* groupId */          \
00153       0,              /* protocol */         \
00154       iresFxns,       /* iresFxns */         \
00155       NULL,           /* stub/skel params */ \
00156       memType,        /* cached mem type */  \
00157       NULL,           /* type - typeTab[0] will be used instead */ \
00158     },
00159 
00160 
00161 /*
00162  *  ======== CE_BEGIN_ALG_TABLE ========
00163  */
00183 #define CE_BEGIN_ALG_TABLE(name)        \
00184 static Engine_AlgDesc CE_##name##_algs[] = {
00185 
00186 
00187 /*
00188  *  ======== CE_END_ALG_TABLE ========
00189  */
00207 #define CE_END_ALG_TABLE(name) \
00208     {NULL},                    \
00209 };
00210 
00211 /*
00212  *  ======== CE_ENGINE ========
00213  */
00232 #define CE_ENGINE(algTab, engineName, serverName) \
00233     { engineName,    /* engine naem */          \
00234       CE_##algTab##_algs,/* alg table */            \
00235       serverName,    /* optional server name */ \
00236       NULL,          /* link config id */       \
00237       0,             /* # of algs (filled in at runtime) */  \
00238     },
00239 
00240 
00241 /*
00242  *  ======== CE_BEGIN_ENGINE_TABLE ========
00243  */
00261 #define CE_BEGIN_ENGINE_TABLE(name) \
00262 static Engine_AlgDesc _localAlgs_000[] = {    \
00263     {NULL},                                   \
00264 };                                            \
00265                                               \
00266 static Engine_Desc name##_000[] = {
00267 
00268 /*
00269  *  ======== CE_END_ENGINE_TABLE ========
00270  */
00288 #define CE_END_ENGINE_TABLE(name)             \
00289     {"local",                                 \
00290      _localAlgs_000,                          \
00291      NULL,                                    \
00292      NULL,                                    \
00293      0,                                       \
00294     },                                        \
00295     {NULL, NULL, NULL, NULL, 0}               \
00296 };                                            \
00297                                               \
00298 Engine_Config Engine_config = {               \
00299     name##_000,                               \
00300     "local"                                   \
00301 };
00302 
00303 /*
00304  *  ======== CERuntime_exit ========
00305  */
00312 extern Void CERuntime_exit(Void);
00313 
00314 
00315 /*
00316  *  ======== CERuntime_init ========
00317  */
00325 extern Void CERuntime_init(Void);
00326 
00329 #ifdef __cplusplus
00330 }
00331 #endif
00332 
00333 #endif
00334 /*
00335  *  @(#) ti.sdo.ce; 1, 0, 6,426; 8-31-2010 20:37:24; /db/atree/library/trees/ce/ce-r08x/src/
00336  */
00337 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Copyright 2010, Texas Instruments Incorporated