SysLink API Reference
2.21.03.11
Main Page
Data Structures
Files
Related Pages
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
ti
ipc
GateMP.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2012, Texas Instruments Incorporated
3
* All rights reserved.
4
*
5
* Redistribution and use in source and binary forms, with or without
6
* modification, are permitted provided that the following conditions
7
* are met:
8
*
9
* * Redistributions of source code must retain the above copyright
10
* notice, this list of conditions and the following disclaimer.
11
*
12
* * Redistributions in binary form must reproduce the above copyright
13
* notice, this list of conditions and the following disclaimer in the
14
* documentation and/or other materials provided with the distribution.
15
*
16
* * Neither the name of Texas Instruments Incorporated nor the names of
17
* its contributors may be used to endorse or promote products derived
18
* from this software without specific prior written permission.
19
*
20
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
* */
83
#ifndef ti_ipc_GateMP__include
84
#define ti_ipc_GateMP__include
85
86
#if defined (__cplusplus)
87
extern
"C"
{
88
#endif
89
90
/* =============================================================================
91
* All success and failure codes for the module
92
* =============================================================================
93
*/
94
98
#define GateMP_S_BUSY 2
99
103
#define GateMP_S_ALREADYSETUP 1
104
108
#define GateMP_S_SUCCESS 0
109
113
#define GateMP_E_FAIL -1
114
118
#define GateMP_E_INVALIDARG -2
119
123
#define GateMP_E_MEMORY -3
124
128
#define GateMP_E_ALREADYEXISTS -4
129
133
#define GateMP_E_NOTFOUND -5
134
138
#define GateMP_E_TIMEOUT -6
139
143
#define GateMP_E_INVALIDSTATE -7
144
147
#define GateMP_E_OSFAILURE -8
148
151
#define GateMP_E_RESOURCE -9
152
155
#define GateMP_E_RESTART -10
156
157
/* =============================================================================
158
* Structures & Enums
159
* =============================================================================
160
*/
161
186
typedef
enum
GateMP_LocalProtect
{
187
GateMP_LocalProtect_NONE
= 0,
190
GateMP_LocalProtect_INTERRUPT
= 1,
193
GateMP_LocalProtect_TASKLET
= 2,
196
GateMP_LocalProtect_THREAD
= 3,
199
GateMP_LocalProtect_PROCESS
= 4
202
}
GateMP_LocalProtect
;
203
204
218
typedef
enum
GateMP_RemoteProtect
{
219
GateMP_RemoteProtect_NONE
= 0,
224
GateMP_RemoteProtect_SYSTEM
= 1,
227
GateMP_RemoteProtect_CUSTOM1
= 2,
230
GateMP_RemoteProtect_CUSTOM2
= 3
233
}
GateMP_RemoteProtect
;
234
238
typedef
struct
GateMP_Object *
GateMP_Handle
;
239
243
typedef
struct
GateMP_Params
{
244
String
name
;
255
UInt16
regionId
;
266
Ptr
sharedAddr;
280
GateMP_LocalProtect
localProtect
;
286
GateMP_RemoteProtect
remoteProtect
;
291
}
GateMP_Params
;
292
293
/* =============================================================================
294
* GateMP Module-wide Functions
295
* =============================================================================
296
*/
297
305
Int
GateMP_close
(GateMP_Handle *handlePtr);
306
316
GateMP_Handle
GateMP_create
(
const
GateMP_Params
*params);
317
325
Int
GateMP_delete
(GateMP_Handle *handlePtr);
326
332
GateMP_Handle
GateMP_getDefaultRemote
(
Void
);
333
339
GateMP_LocalProtect
GateMP_getLocalProtect
(GateMP_Handle handle);
340
346
GateMP_RemoteProtect
GateMP_getRemoteProtect
(GateMP_Handle handle);
347
360
Int
GateMP_open
(
String
name, GateMP_Handle *handlePtr);
361
363
Int
GateMP_openByAddr(
Ptr
sharedAddr, GateMP_Handle *handlePtr);
364
373
Void
GateMP_Params_init
(
GateMP_Params
*params);
374
384
SizeT
GateMP_sharedMemReq(
const
GateMP_Params
*params);
385
388
/* =============================================================================
389
* GateMP Per-instance Functions
390
* =============================================================================
391
*/
392
400
IArg
GateMP_enter
(GateMP_Handle handle);
401
408
Void
GateMP_leave
(GateMP_Handle handle,
IArg
key);
409
410
#if defined (__cplusplus)
411
}
412
#endif
/* defined (__cplusplus) */
413
#endif
/* ti_ipc_GateMP__include */
414
415
/*
416
*/
417
418
/*
419
* @(#) ti.ipc; 1, 0, 0, 0,; 11-7-2012 13:07:52; /db/vtree/library/trees/ipc/ipc-i09/src/ xlibrary
420
421
*/
422
Copyright 2014, Texas Instruments Incorporated