Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00083 #ifndef ti_ipc_GateMP__include
00084 #define ti_ipc_GateMP__include
00085
00086 #if defined (__cplusplus)
00087 extern "C" {
00088 #endif
00089
00090
00091
00092
00093
00094
00099 #define GateMP_S_BUSY 2
00100
00105 #define GateMP_S_ALREADYSETUP 1
00106
00111 #define GateMP_S_SUCCESS 0
00112
00117 #define GateMP_E_FAIL -1
00118
00123 #define GateMP_E_INVALIDARG -2
00124
00129 #define GateMP_E_MEMORY -3
00130
00135 #define GateMP_E_ALREADYEXISTS -4
00136
00141 #define GateMP_E_NOTFOUND -5
00142
00147 #define GateMP_E_TIMEOUT -6
00148
00153 #define GateMP_E_INVALIDSTATE -7
00154
00158 #define GateMP_E_OSFAILURE -8
00159
00163 #define GateMP_E_RESOURCE -9
00164
00168 #define GateMP_E_RESTART -10
00169
00170
00171
00172
00173
00174
00199 typedef enum GateMP_LocalProtect {
00200 GateMP_LocalProtect_NONE = 0,
00203 GateMP_LocalProtect_INTERRUPT = 1,
00206 GateMP_LocalProtect_TASKLET = 2,
00209 GateMP_LocalProtect_THREAD = 3,
00212 GateMP_LocalProtect_PROCESS = 4
00215 } GateMP_LocalProtect;
00216
00217
00231 typedef enum GateMP_RemoteProtect {
00232 GateMP_RemoteProtect_NONE = 0,
00237 GateMP_RemoteProtect_SYSTEM = 1,
00240 GateMP_RemoteProtect_CUSTOM1 = 2,
00243 GateMP_RemoteProtect_CUSTOM2 = 3
00246 } GateMP_RemoteProtect;
00247
00251 typedef struct GateMP_Object *GateMP_Handle;
00252
00256 typedef struct GateMP_Params {
00257 String name;
00268 UInt16 regionId;
00278 Ptr sharedAddr;
00289 GateMP_LocalProtect localProtect;
00295 GateMP_RemoteProtect remoteProtect;
00300 } GateMP_Params;
00301
00302
00303
00304
00305
00306
00314 Int GateMP_close(GateMP_Handle *handlePtr);
00315
00325 GateMP_Handle GateMP_create(const GateMP_Params *params);
00326
00334 Int GateMP_delete(GateMP_Handle *handlePtr);
00335
00341 GateMP_Handle GateMP_getDefaultRemote(Void);
00342
00348 GateMP_LocalProtect GateMP_getLocalProtect(GateMP_Handle handle);
00349
00355 GateMP_RemoteProtect GateMP_getRemoteProtect(GateMP_Handle handle);
00356
00369 Int GateMP_open(String name, GateMP_Handle *handlePtr);
00370
00372 Int GateMP_openByAddr(Ptr sharedAddr, GateMP_Handle *handlePtr);
00373
00382 Void GateMP_Params_init(GateMP_Params *params);
00383
00393 SizeT GateMP_sharedMemReq(const GateMP_Params *params);
00394
00397
00398
00399
00400
00401
00409 IArg GateMP_enter(GateMP_Handle handle);
00410
00417 Void GateMP_leave(GateMP_Handle handle, IArg key);
00418
00419 #if defined (__cplusplus)
00420 }
00421 #endif
00422 #endif
00423
00424
00425
00426
00427
00428
00429
00430