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  */
00235 #define CE_ENGINE(algTab, engineName, serverName) \
00236     { engineName,    /* engine naem */          \
00237       CE_##algTab##_algs,/* alg table */            \
00238       serverName,    /* optional server name */ \
00239       NULL,          /* link config id */       \
00240       0,             /* # of algs (filled in at runtime) */  \
00241     },
00242 
00243 
00244 /*
00245  *  ======== CE_BEGIN_ENGINE_TABLE ========
00246  */
00264 #define CE_BEGIN_ENGINE_TABLE(name) \
00265 static Engine_AlgDesc _localAlgs_000[] = {    \
00266     {NULL},                                   \
00267 };                                            \
00268                                               \
00269 static Engine_Desc name##_000[] = {
00270 
00271 /*
00272  *  ======== CE_END_ENGINE_TABLE ========
00273  */
00291 #define CE_END_ENGINE_TABLE(name)             \
00292     {"local",                                 \
00293      _localAlgs_000,                          \
00294      NULL,                                    \
00295      NULL,                                    \
00296      0,                                       \
00297     },                                        \
00298     {NULL, NULL, NULL, NULL, 0}               \
00299 };                                            \
00300                                               \
00301 Engine_Config Engine_config = {               \
00302     name##_000,                               \
00303     "local"                                   \
00304 };
00305 
00306 /*
00307  *  ======== CERuntime_exit ========
00308  */
00315 extern Void CERuntime_exit(Void);
00316 
00317 
00318 /*
00319  *  ======== CERuntime_init ========
00320  */
00328 extern Void CERuntime_init(Void);
00329 
00332 #ifdef __cplusplus
00333 }
00334 #endif
00335 
00336 #endif
00337 /*
00338  *  @(#) ti.sdo.ce; 1, 0, 6,432; 12-2-2010 21:19:06; /db/atree/library/trees/ce/ce-r11x/src/ xlibrary
00339 
00340  */
00341 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Copyright 2010, Texas Instruments Incorporated