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;
00279 Ptr sharedAddr;
00293 GateMP_LocalProtect localProtect;
00299 GateMP_RemoteProtect remoteProtect;
00304 } GateMP_Params;
00305
00306
00307
00308
00309
00310
00318 Int GateMP_close(GateMP_Handle *handlePtr);
00319
00329 GateMP_Handle GateMP_create(const GateMP_Params *params);
00330
00338 Int GateMP_delete(GateMP_Handle *handlePtr);
00339
00345 GateMP_Handle GateMP_getDefaultRemote(Void);
00346
00352 GateMP_LocalProtect GateMP_getLocalProtect(GateMP_Handle handle);
00353
00359 GateMP_RemoteProtect GateMP_getRemoteProtect(GateMP_Handle handle);
00360
00373 Int GateMP_open(String name, GateMP_Handle *handlePtr);
00374
00376 Int GateMP_openByAddr(Ptr sharedAddr, GateMP_Handle *handlePtr);
00377
00386 Void GateMP_Params_init(GateMP_Params *params);
00387
00397 SizeT GateMP_sharedMemReq(const GateMP_Params *params);
00398
00401
00402
00403
00404
00405
00413 IArg GateMP_enter(GateMP_Handle handle);
00414
00421 Void GateMP_leave(GateMP_Handle handle, IArg key);
00422
00423 #if defined (__cplusplus)
00424 }
00425 #endif
00426 #endif
00427
00428
00429
00430
00431
00432
00433
00434
00435