00001 00008 /* 00009 * ============================================================================ 00010 * 00011 * Copyright (c) 2008-2012, Texas Instruments Incorporated 00012 * 00013 * Redistribution and use in source and binary forms, with or without 00014 * modification, are permitted provided that the following conditions 00015 * are met: 00016 * 00017 * * Redistributions of source code must retain the above copyright 00018 * notice, this list of conditions and the following disclaimer. 00019 * 00020 * * Redistributions in binary form must reproduce the above copyright 00021 * notice, this list of conditions and the following disclaimer in the 00022 * documentation and/or other materials provided with the distribution. 00023 * 00024 * * Neither the name of Texas Instruments Incorporated nor the names of 00025 * its contributors may be used to endorse or promote products derived 00026 * from this software without specific prior written permission. 00027 * 00028 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00029 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 00030 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 00031 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 00032 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 00033 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 00034 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 00035 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 00036 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 00037 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 00038 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00039 * Contact information for paper mail: 00040 * Texas Instruments 00041 * Post Office Box 655303 00042 * Dallas, Texas 75265 00043 * Contact information: 00044 * http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm? 00045 * DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact 00046 * ============================================================================ 00047 * 00048 */ 00049 00050 00051 00052 #ifndef ti_syslink_utils_GateProcess 00053 #define ti_syslink_utils_GateProcess 00054 00055 00056 #if defined (__cplusplus) 00057 extern "C" { 00058 #endif 00059 00060 00061 /* ============================================================================= 00062 * Status codes 00063 * ============================================================================= 00064 */ 00065 00070 #define GateProcess_E_INVALIDARG (-1) 00071 00076 #define GateProcess_E_MEMORY (-2) 00077 00082 #define GateProcess_E_BUSY (-3) 00083 00088 #define GateProcess_E_FAIL (-4) 00089 00094 #define GateProcess_E_NOTFOUND (-5) 00095 00100 #define GateProcess_E_INVALIDSTATE (-6) 00101 00106 #define GateProcess_E_INUSE (-7) 00107 00112 #define GateProcess_S_SUCCESS (0) 00113 00114 00115 /* ============================================================================= 00116 * Macros and types 00117 * ============================================================================= 00118 */ 00120 typedef struct GateProcess_Object GateProcess_Object; 00121 00125 typedef GateProcess_Object * GateProcess_Handle; 00126 00130 typedef struct { 00131 UInt reserved; 00132 } GateProcess_Params; 00133 00134 00138 typedef struct { 00139 Char _f1[16]; 00140 } GateProcess_ShMem; 00141 00142 00143 /* ============================================================================= 00144 * APIs 00145 * ============================================================================= 00146 */ 00147 00148 /* 00149 * ======== GateProcess_enter ======== 00150 */ 00151 IArg GateProcess_enter(GateProcess_Handle handle); 00152 00153 /* 00154 * ======== GateProcess_leave ======== 00155 */ 00156 Void GateProcess_leave(GateProcess_Handle handle, IArg key); 00157 00158 /* 00159 * ======== GateProcess_Params_init ======== 00160 */ 00161 Void GateProcess_Params_init(GateProcess_Params *params); 00162 00163 /* 00164 * ======== GateProcess_create ======== 00165 */ 00166 GateProcess_Handle GateProcess_create( 00167 Ptr sharedAddr, 00168 const GateProcess_Params * params); 00169 00170 /* 00171 * ======== GateProcess_delete ======== 00172 */ 00173 Int GateProcess_delete(GateProcess_Handle *pHandle); 00174 00175 /* 00176 * ======== GateProcess_open ======== 00177 */ 00178 GateProcess_Handle GateProcess_open(Ptr sharedAddr); 00179 00180 /* 00181 * ======== GateProcess_close ======== 00182 */ 00183 Int GateProcess_close(GateProcess_Handle *pHandle); 00184 00185 /* 00186 * ======== GateProcess_shMemSize ======== 00187 */ 00188 SizeT GateProcess_shMemSize(Void); 00189 00190 00191 #if defined (__cplusplus) 00192 } 00193 #endif 00194 00195 #endif /* ti_syslink_utils_GateProcess */