]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/open-amp.git/blob - libs/system/zc702evk/nucleus/kernel/nu_kernel.h
Moving OpenAMP sources to GIT repo.
[processor-sdk/open-amp.git] / libs / system / zc702evk / nucleus / kernel / nu_kernel.h
1 /***********************************************************************\r
2 *\r
3 *            Copyright 2011 Mentor Graphics Corporation\r
4 *                         All Rights Reserved.\r
5 *\r
6 * THIS WORK CONTAINS TRADE SECRET AND PROPRIETARY INFORMATION WHICH IS\r
7 * THE PROPERTY OF MENTOR GRAPHICS CORPORATION OR ITS LICENSORS AND IS\r
8 * SUBJECT TO LICENSE TERMS.\r
9 *\r
10 ************************************************************************\r
11 \r
12 ************************************************************************\r
13 *\r
14 *  DESCRIPTION\r
15 *\r
16 *       This file contains kernel constants common to both the\r
17 *       application and the actual Nucleus PLUS kernel.\r
18 *\r
19 ***********************************************************************/\r
20 \r
21 /* Check to see if this file has been included already.  */\r
22 \r
23 #ifndef         NU_KERNEL\r
24 #ifdef          __cplusplus\r
25 /* C declarations in C++     */\r
26 extern          "C" {\r
27 #endif\r
28 #define         NU_KERNEL\r
29 \r
30 \r
31 /**********************************************************************/\r
32 /*                    Service Paramaeters                             */\r
33 /**********************************************************************/\r
34 /* Define constants for use in service parameters.  */\r
35 #define         NU_AND                              2\r
36 #define         NU_AND_CONSUME                      3\r
37 #define         NU_DISABLE_TIMER                    4\r
38 #define         NU_ENABLE_TIMER                     5\r
39 #define         NU_FIFO                             6\r
40 #define         NU_FIXED_SIZE                       7\r
41 #define         NU_NO_PREEMPT                       8\r
42 #define         NU_NO_START                         9\r
43 #define         NU_NO_SUSPEND                       0\r
44 #define         NU_OR                               0\r
45 #define         NU_OR_CONSUME                       1\r
46 #define         NU_PREEMPT                          10\r
47 #define         NU_PRIORITY                         11\r
48 #define         NU_START                            12\r
49 #define         NU_SUSPEND                          0xFFFFFFFFUL\r
50 #define         NU_VARIABLE_SIZE                    13\r
51 #define         NU_PRIORITY_INHERIT                 14\r
52 \r
53 /* Define service completion status constants.  */\r
54 #define         NU_SUCCESS                          0\r
55 #define         NU_END_OF_LOG                       -1\r
56 #define         NU_GROUP_DELETED                    -2\r
57 #define         NU_INVALID_DELETE                   -3\r
58 #define         NU_INVALID_DRIVER                   -4\r
59 #define         NU_INVALID_ENABLE                   -5\r
60 #define         NU_INVALID_ENTRY                    -6\r
61 #define         NU_INVALID_FUNCTION                 -7\r
62 #define         NU_INVALID_GROUP                    -8\r
63 #define         NU_INVALID_HISR                     -9\r
64 #define         NU_INVALID_MAILBOX                  -10\r
65 #define         NU_INVALID_MEMORY                   -11\r
66 #define         NU_INVALID_MESSAGE                  -12\r
67 #define         NU_INVALID_OPERATION                -13\r
68 #define         NU_INVALID_PIPE                     -14\r
69 #define         NU_INVALID_POINTER                  -15\r
70 #define         NU_INVALID_POOL                     -16\r
71 #define         NU_INVALID_PREEMPT                  -17\r
72 #define         NU_INVALID_PRIORITY                 -18\r
73 #define         NU_INVALID_QUEUE                    -19\r
74 #define         NU_INVALID_RESUME                   -20\r
75 #define         NU_INVALID_SEMAPHORE                -21\r
76 #define         NU_INVALID_SIZE                     -22\r
77 #define         NU_INVALID_START                    -23\r
78 #define         NU_INVALID_SUSPEND                  -24\r
79 #define         NU_INVALID_TASK                     -25\r
80 #define         NU_INVALID_TIMER                    -26\r
81 #define         NU_INVALID_VECTOR                   -27\r
82 #define         NU_MAILBOX_DELETED                  -28\r
83 #define         NU_MAILBOX_EMPTY                    -29\r
84 #define         NU_MAILBOX_FULL                     -30\r
85 #define         NU_MAILBOX_RESET                    -31\r
86 #define         NU_NO_MEMORY                        -32\r
87 #define         NU_NO_MORE_LISRS                    -33\r
88 #define         NU_NO_PARTITION                     -34\r
89 #define         NU_NOT_DISABLED                     -35\r
90 #define         NU_NOT_PRESENT                      -36\r
91 #define         NU_NOT_REGISTERED                   -37\r
92 #define         NU_NOT_TERMINATED                   -38\r
93 #define         NU_PIPE_DELETED                     -39\r
94 #define         NU_PIPE_EMPTY                       -40\r
95 #define         NU_PIPE_FULL                        -41\r
96 #define         NU_PIPE_RESET                       -42\r
97 #define         NU_POOL_DELETED                     -43\r
98 #define         NU_QUEUE_DELETED                    -44\r
99 #define         NU_QUEUE_EMPTY                      -45\r
100 #define         NU_QUEUE_FULL                       -46\r
101 #define         NU_QUEUE_RESET                      -47\r
102 #define         NU_SEMAPHORE_DELETED                -48\r
103 #define         NU_SEMAPHORE_RESET                  -49\r
104 #define         NU_TIMEOUT                          -50\r
105 #define         NU_UNAVAILABLE                      -51\r
106 #define         NU_INVALID_DESCRIPTION              -52\r
107 #define         NU_INVALID_REGION                   -53\r
108 #define         NU_MEMORY_CORRUPT                   -54\r
109 #define         NU_INVALID_DEBUG_ALLOCATION         -55\r
110 #define         NU_EMPTY_DEBUG_ALLOCATION_LIST      -56\r
111 #define         NU_HISR_ACTIVATION_COUNT_ERROR      -57\r
112 #define         NU_ZC_INVALID_PTR                   -58\r
113 #define         NU_ZC_INVALID_BUF_ID                -59\r
114 #define         NU_ZC_BUF_SEG_MISMATCH              -60\r
115 #define         NU_ZC_INVALID_SEG_OFFSET            -61\r
116 #define         NU_ZC_BUF_EMPTY                     -62\r
117 #define         NU_ZC_INSUFFICIENT_MEMORY           -63\r
118 #define         NU_ZC_INIT_ALREADY_COMPLETE         -64\r
119 #define         NU_EN_INVALID_INPUT_PARAMS          -65\r
120 #define         NU_EN_ALREADY_LISTENING             -66\r
121 #define         NU_EN_NO_AVAIL_LISTEN_ENTRY         -67\r
122 #define         NU_EN_NO_ACTIVE_LISTENERS           -68\r
123 #define         NU_EN_LISTENER_NOT_FOUND            -69\r
124 #define         NU_INVALID_RESUME_TIMER             -70\r
125 #define         NU_INVALID_PAUSE_TIMER              -71\r
126 #define         NU_TIMER_PAUSED                     -72\r
127 #define         NU_INVALID_COUNT                    -73\r
128 #define         NU_SEMAPHORE_INVALID_OWNER          -74\r
129 #define         NU_NO_WAITING_TASKS                 -75\r
130 #define         NU_SEMAPHORE_ALREADY_OWNED          -76\r
131 #define         NU_EQM_INVALID_EVENT_SIZE           -77\r
132 #define         NU_EQM_INVALID_HANDLE               -78\r
133 #define         NU_EQM_EVENT_EXPIRED                -79\r
134 #define         NU_EQM_EVENT_WITHOUT_DATA           -80\r
135 #define         NU_EQM_INVALID_INPUT                -81\r
136 #define         NU_NOT_ALIGNED                      -82\r
137 #define         NU_SEMAPHORE_COUNT_ROLLOVER         -83\r
138 #define         NU_INVALID_PROCESS                  -84\r
139 #define         NU_INVALID_STATE                    -85\r
140 #define         NU_PROCESS_IN_TRANSITION            -86\r
141 #define         NU_SEMAPHORE_OWNER_DEAD             -87\r
142 #define         NU_SYMBOLS_IN_USE                   -88\r
143 #define         NU_INVALID_MEMORY_REGION            -89\r
144 #define         NU_MEMORY_IS_SHARED                 -90\r
145 #define         NU_MEMORY_OVERLAPS                  -91\r
146 #define         NU_INVALID_OPTIONS                  -92\r
147 \r
148 /**********************************************************************/\r
149 /*                 Processes Configuration                            */\r
150 /**********************************************************************/\r
151 \r
152 #include        "kernel/proc_extern.h"\r
153 \r
154 /* Legacy macros */\r
155 #define         NU_SUPERVISOR_MODE()\r
156 #define         NU_USER_MODE()\r
157 #define         NU_SUPERV_USER_VARIABLES\r
158 #define         NU_SUPERVISOR_MODE_ISR()\r
159 #define         NU_USER_MODE_ISR()\r
160 #define         NU_BIND_TASK_TO_KERNEL(task)    NU_SUCCESS\r
161 #define         NU_BIND_HISR_TO_KERNEL(hisr)    NU_SUCCESS\r
162 \r
163 /**********************************************************************/\r
164 /*                          Kernel Support                            */\r
165 /**********************************************************************/\r
166 \r
167 /* Define the basic data structure templates.  */\r
168 #include        "kernel/plus_core.h"\r
169 #include        "kernel/dev_mgr.h"\r
170 #include        "kernel/eqm.h"\r
171 #include        "kernel/rtl_extr.h"\r
172 #include        "kernel/esal_extr.h"\r
173 \r
174 #ifdef CFG_NU_OS_KERN_PLUS_SUPPLEMENT_ENABLE\r
175 #include        "kernel/plus_supplement.h"\r
176 #endif  /* CFG_NU_OS_KERN_PLUS_SUPPLEMENT_ENABLE */\r
177 \r
178 /* Define Nucleus PLUS system interface */\r
179 VOID            Application_Initialize(NU_MEMORY_POOL*, NU_MEMORY_POOL*);\r
180 NU_WEAK_REF(VOID Pre_Kernel_Init_Hook(NU_MEMORY_POOL*, NU_MEMORY_POOL*));\r
181 \r
182 /**********************************************************************/\r
183 /*                    Support Definitions                             */\r
184 /**********************************************************************/\r
185 /* Include Nucleus PLUS configuration settings */\r
186 #include        "kernel/plus_cfg.h"\r
187 \r
188 \r
189 #ifdef          __cplusplus\r
190 \r
191 /* End of C declarations */\r
192 }\r
193 \r
194 #endif  /* __cplusplus */\r
195 \r
196 #endif  /* !NU_KERNEL */\r