CERuntime.h

Go to the documentation of this file.
00001 /* 
00002  * Copyright (c) 2012, 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 /* Define this symbol so alg table for an engine can be NULL */
00061 #define CE_NULL_algs NULL
00062 
00073 /*
00074  *  ======== CE_DECLARE_TYPE ========
00075  */
00106 #define CE_DECLARE_TYPE(name, types)         \
00107                                              \
00108 static String typeTab_##name [] = {          \
00109     types,                                   \
00110     NULL                                     \
00111 };                                           \
00112                                              \
00113 /*
00114  *  ======== CE_LOCAL_ALG ========
00115  */
00116 
00155 #define CE_LOCAL_ALG(name, algName, ialgFxns, idma3Fxns, iresFxns, groupId, \
00156                      memType) \
00157                                              \
00158     { algName,        /* name */             \
00159       {0},            /* uuid */             \
00160       ialgFxns,       /* ialgFxns */         \
00161       idma3Fxns,      /* idma3Fxns */        \
00162       typeTab_##name, /* typeTab */          \
00163       TRUE,           /* isLocal */          \
00164       groupId,        /* groupId */          \
00165       0,              /* protocol */         \
00166       iresFxns,       /* iresFxns */         \
00167       NULL,           /* stub/skel params */ \
00168       memType,        /* cached mem type */  \
00169       NULL,           /* type - typeTab[0] will be used instead */ \
00170     },
00171 
00172 /*
00173  *  ======== CE_LOCAL_ALG2 ========
00174  */
00215 #define CE_LOCAL_ALG2(algName, ialgFxns, idma3Fxns, iresFxns, groupId, \
00216                      memType, types) \
00217                                              \
00218     { algName,        /* name */             \
00219       {0},            /* uuid */             \
00220       ialgFxns,       /* ialgFxns */         \
00221       idma3Fxns,      /* idma3Fxns */        \
00222       NULL,           /* typeTab */          \
00223       TRUE,           /* isLocal */          \
00224       groupId,        /* groupId */          \
00225       0,              /* protocol */         \
00226       iresFxns,       /* iresFxns */         \
00227       NULL,           /* stub/skel params */ \
00228       memType,        /* cached mem type */  \
00229       types,          /* types */            \
00230     },
00231 
00232 /*
00233  *  ======== CE_DECLARE_LOCAL_ALG ========
00234  */
00273 #define CE_DECLARE_LOCAL_ALG(name, algName, ialgFxns, idma3Fxns, iresFxns, \
00274                      groupId, memType, types) \
00275 static Engine_AlgDesc  name = \
00276                                              \
00277     { algName,        /* name */             \
00278       {0},            /* uuid */             \
00279       ialgFxns,       /* ialgFxns */         \
00280       idma3Fxns,      /* idma3Fxns */        \
00281       NULL,           /* typeTab */          \
00282       TRUE,           /* isLocal */          \
00283       groupId,        /* groupId */          \
00284       0,              /* protocol */         \
00285       iresFxns,       /* iresFxns */         \
00286       NULL,           /* stub/skel params */ \
00287       memType,        /* cached mem type */  \
00288       types,           /* type - typeTab[0] will be used instead */ \
00289     };
00290 
00291 
00292 /*
00293  *  ======== CE_BEGIN_ALG_TABLE ========
00294  */
00317 #define CE_BEGIN_ALG_TABLE(name)        \
00318 static Engine_AlgDesc CE_##name##_algs[] = {
00319 
00320 
00321 /*
00322  *  ======== CE_END_ALG_TABLE ========
00323  */
00344 #define CE_END_ALG_TABLE(name) \
00345     {NULL},                    \
00346 };
00347 
00348 /*
00349  *  ======== CE_ENGINE ========
00350  */
00385 #define CE_ENGINE(algTab, engName, serverName, memMap, useExtLoader, heapId) \
00386     { engName,            /* engine name */                      \
00387       CE_##algTab##_algs, /* alg table */                        \
00388       serverName,         /* optional server name */             \
00389       NULL,               /* memMap */                           \
00390       0,                  /* useExtLoader */                     \
00391       0,                  /* # of algs (filled in at runtime) */ \
00392       heapId              /* heapId */                           \
00393     },
00394 
00395 
00396 /*
00397  *  ======== CE_BEGIN_ENGINE_TABLE ========
00398  */
00417 #define CE_BEGIN_ENGINE_TABLE(name) \
00418 static Engine_AlgDesc _localAlgs_000[] = {    \
00419     {NULL},                                   \
00420 };                                            \
00421                                               \
00422 static Engine_Desc name##_000[] = {
00423 
00424 /*
00425  *  ======== CE_END_ENGINE_TABLE ========
00426  */
00445 #define CE_END_ENGINE_TABLE(name)             \
00446     {"local",                                 \
00447      _localAlgs_000,                          \
00448      NULL,                                    \
00449      NULL,                                    \
00450      0,                                       \
00451     },                                        \
00452     {NULL, NULL, NULL, NULL, 0}               \
00453 };                                            \
00454                                               \
00455 Engine_Config Engine_config = {               \
00456     name##_000,                               \
00457     "local"                                   \
00458 };
00459 
00460 /*
00461  *  ======== CERuntime_exit ========
00462  */
00471 extern Void CERuntime_exit(Void);
00472 
00473 
00474 /*
00475  *  ======== CERuntime_init ========
00476  */
00495 extern Void CERuntime_init(Void);
00496 
00499 #ifdef __cplusplus
00500 }
00501 #endif
00502 
00503 #endif
00504 /*
00505  *  @(#) ti.sdo.ce; 1, 0, 6,1; 1-17-2012 23:09:31; /db/atree/library/trees/ce/ce-t03/src/ xlibrary
00506 
00507  */
00508 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Copyright 2012, Texas Instruments Incorporated