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
00077 #ifndef ti_ipc_GateMP__include
00078 #define ti_ipc_GateMP__include
00079
00080 #if defined (__cplusplus)
00081 extern "C" {
00082 #endif
00083
00084
00085
00086
00087
00088
00093 #define GateMP_S_BUSY 2
00094
00099 #define GateMP_S_ALREADYSETUP 1
00100
00105 #define GateMP_S_SUCCESS 0
00106
00111 #define GateMP_E_FAIL -1
00112
00117 #define GateMP_E_INVALIDARG -2
00118
00123 #define GateMP_E_MEMORY -3
00124
00129 #define GateMP_E_ALREADYEXISTS -4
00130
00135 #define GateMP_E_NOTFOUND -5
00136
00141 #define GateMP_E_TIMEOUT -6
00142
00147 #define GateMP_E_INVALIDSTATE -7
00148
00152 #define GateMP_E_OSFAILURE -8
00153
00157 #define GateMP_E_RESOURCE -9
00158
00162 #define GateMP_E_RESTART -10
00163
00164
00165
00166
00167
00168
00193 typedef enum GateMP_LocalProtect {
00194 GateMP_LocalProtect_NONE = 0,
00197 GateMP_LocalProtect_INTERRUPT = 1,
00200 GateMP_LocalProtect_TASKLET = 2,
00203 GateMP_LocalProtect_THREAD = 3,
00206 GateMP_LocalProtect_PROCESS = 4
00209 } GateMP_LocalProtect;
00210
00211
00225 typedef enum GateMP_RemoteProtect {
00226 GateMP_RemoteProtect_NONE = 0,
00231 GateMP_RemoteProtect_SYSTEM = 1,
00234 GateMP_RemoteProtect_CUSTOM1 = 2,
00237 GateMP_RemoteProtect_CUSTOM2 = 3
00240 } GateMP_RemoteProtect;
00241
00245 typedef struct GateMP_Object *GateMP_Handle;
00246
00250 typedef struct GateMP_Params {
00251 String name;
00259 UInt16 regionId;
00269 Ptr sharedAddr;
00280 GateMP_LocalProtect localProtect;
00286 GateMP_RemoteProtect remoteProtect;
00291 } GateMP_Params;
00292
00293
00294
00295
00296
00297
00305 Int GateMP_close(GateMP_Handle *handlePtr);
00306
00316 GateMP_Handle GateMP_create(const GateMP_Params *params);
00317
00325 Int GateMP_delete(GateMP_Handle *handlePtr);
00326
00332 GateMP_Handle GateMP_getDefaultRemote(Void);
00333
00339 GateMP_LocalProtect GateMP_getLocalProtect(GateMP_Handle handle);
00340
00346 GateMP_RemoteProtect GateMP_getRemoteProtect(GateMP_Handle handle);
00347
00360 Int GateMP_open(String name, GateMP_Handle *handlePtr);
00361
00363 Int GateMP_openByAddr(Ptr sharedAddr, GateMP_Handle *handlePtr);
00364
00373 Void GateMP_Params_init(GateMP_Params *params);
00374
00384 SizeT GateMP_sharedMemReq(const GateMP_Params *params);
00385
00388
00389
00390
00391
00392
00400 IArg GateMP_enter(GateMP_Handle handle);
00401
00408 Void GateMP_leave(GateMP_Handle handle, IArg key);
00409
00410 #if defined (__cplusplus)
00411 }
00412 #endif
00413 #endif
00414
00415
00416
00417
00418
00419
00420
00421