Prevent SR0 owner from being stopped if host process is still using GateMP
[ipc/ipcdev.git] / qnx / src / ipc3x_dev / ti / syslink / inc / GateMPDrvDefs.h
1 /*
2  * Copyright (c) 2013-2014, 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  */
32 /*!
33  *  @file       GateMPDrvDefs.h
34  *
35  *  @brief      Definitions of GateMPDrv types and structures.
36  *
37  */
40 #ifndef GATEMP_DRVDEFS_H
41 #define GATEMP_DRVDEFS_H
44 #include <ti/ipc/GateMP.h>
45 #include <ti/ipc/NameServer.h>
47 #include "UtilsCmdBase.h"
48 #include "_GateMP.h"
49 #include "_MultiProc.h"
50 #include <ti/syslink/inc/IoctlDefs.h>
53 #if defined (__cplusplus)
54 extern "C" {
55 #endif
58 /*  ----------------------------------------------------------------------------
59  *  IOCTL command IDs for GateMP
60  *  ----------------------------------------------------------------------------
61  */
62 /*!
63  *  @brief  Base command ID for GateMP
64  */
65 #define GATEMP_BASE_CMD                 (0x160)
67 /*!
68  *  @brief  Command for GateMP_getFreeResource
69  */
70 #define CMD_GATEMP_GETFREERES           _IOWR(UTILSCMDBASE,\
71                                             GATEMP_BASE_CMD + 1u,\
72                                             GateMPDrv_CmdArgs)
73 /*!
74  *  @brief  Command for GateMP_releaseResource
75  */
76 #define CMD_GATEMP_RELRES               _IOWR(UTILSCMDBASE,\
77                                             GATEMP_BASE_CMD + 2u,\
78                                             GateMPDrv_CmdArgs)
79 /*!
80  *  @brief  Command for GateMP_getNumResource
81  */
82 #define CMD_GATEMP_GETNUMRES            _IOWR(UTILSCMDBASE,\
83                                             GATEMP_BASE_CMD + 3u,\
84                                             GateMPDrv_CmdArgs)
85 /*!
86  *  @brief  Command for GateMP_start
87  */
88 #define CMD_GATEMP_START                _IOWR(UTILSCMDBASE,\
89                                             GATEMP_BASE_CMD + 4u,\
90                                             GateMPDrv_CmdArgs)
91 /*!
92  *  @brief  Command for GateMP_stop
93  */
94 #define CMD_GATEMP_STOP                 _IOWR(UTILSCMDBASE,\
95                                             GATEMP_BASE_CMD + 5u,\
96                                             GateMPDrv_CmdArgs)
97 /*!
98  *  @brief  Command for GateMP_isSetup
99  */
100 #define CMD_GATEMP_ISSETUP              _IOWR(UTILSCMDBASE,\
101                                             GATEMP_BASE_CMD + 6u,\
102                                             GateMPDrv_CmdArgs)
106 /*  ----------------------------------------------------------------------------
107  *  Command arguments for GateMP
108  *  ----------------------------------------------------------------------------
109  */
110 /*!
111  *  @brief  Command arguments for GateMP
112  */
113 typedef struct GateMPDrv_CmdArgs {
114     union {
115         struct {
116             GateMP_RemoteProtect type;
117             Int32                id;
118         } getFreeResource;
120         struct {
121             GateMP_RemoteProtect type;
122             Int32                id;
123         } releaseResource;
125         struct {
126             GateMP_RemoteProtect type;
127             Int32                value;
128         } getNumResources;
130         struct {
131             NameServer_Handle   nameServerHandle;
132         } start;
134         struct {
135             Bool                 result;
136         } isSetup;
137     } args;
139     Int32 apiStatus;
140 } GateMPDrv_CmdArgs;
143 #if defined (__cplusplus)
145 #endif /* defined (__cplusplus) */
148 #endif /* GateMP_DrvDefs_H */