OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [freertos-6.1.1/] [Source/] [include/] [FreeRTOS.h] - Blame information for rev 655

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 572 jeremybenn
/*
2
    FreeRTOS V6.1.1 - Copyright (C) 2011 Real Time Engineers Ltd.
3
 
4
    ***************************************************************************
5
    *                                                                         *
6
    * If you are:                                                             *
7
    *                                                                         *
8
    *    + New to FreeRTOS,                                                   *
9
    *    + Wanting to learn FreeRTOS or multitasking in general quickly       *
10
    *    + Looking for basic training,                                        *
11
    *    + Wanting to improve your FreeRTOS skills and productivity           *
12
    *                                                                         *
13
    * then take a look at the FreeRTOS books - available as PDF or paperback  *
14
    *                                                                         *
15
    *        "Using the FreeRTOS Real Time Kernel - a Practical Guide"        *
16
    *                  http://www.FreeRTOS.org/Documentation                  *
17
    *                                                                         *
18
    * A pdf reference manual is also available.  Both are usually delivered   *
19
    * to your inbox within 20 minutes to two hours when purchased between 8am *
20
    * and 8pm GMT (although please allow up to 24 hours in case of            *
21
    * exceptional circumstances).  Thank you for your support!                *
22
    *                                                                         *
23
    ***************************************************************************
24
 
25
    This file is part of the FreeRTOS distribution.
26
 
27
    FreeRTOS is free software; you can redistribute it and/or modify it under
28
    the terms of the GNU General Public License (version 2) as published by the
29
    Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
30
    ***NOTE*** The exception to the GPL is included to allow you to distribute
31
    a combined work that includes FreeRTOS without being obliged to provide the
32
    source code for proprietary components outside of the FreeRTOS kernel.
33
    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
34
    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
35
    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
36
    more details. You should have received a copy of the GNU General Public
37
    License and the FreeRTOS license exception along with FreeRTOS; if not it
38
    can be viewed here: http://www.freertos.org/a00114.html and also obtained
39
    by writing to Richard Barry, contact details for whom are available on the
40
    FreeRTOS WEB site.
41
 
42
    1 tab == 4 spaces!
43
 
44
    http://www.FreeRTOS.org - Documentation, latest information, license and
45
    contact details.
46
 
47
    http://www.SafeRTOS.com - A version that is certified for use in safety
48
    critical systems.
49
 
50
    http://www.OpenRTOS.com - Commercial support, development, porting,
51
    licensing and training services.
52
*/
53
 
54
#ifndef INC_FREERTOS_H
55
#define INC_FREERTOS_H
56
 
57
 
58
/*
59
 * Include the generic headers required for the FreeRTOS port being used.
60
 */
61
#include <stddef.h>
62
 
63
/* Basic FreeRTOS definitions. */
64
#include "projdefs.h"
65
 
66
/* Application specific configuration options. */
67
#include "FreeRTOSConfig.h"
68
 
69
/* Definitions specific to the port being used. */
70
#include "portable.h"
71
 
72
 
73
/* Defines the prototype to which the application task hook function must
74
conform. */
75
typedef portBASE_TYPE (*pdTASK_HOOK_CODE)( void * );
76
 
77
 
78
 
79
 
80
 
81
/*
82
 * Check all the required application specific macros have been defined.
83
 * These macros are application specific and (as downloaded) are defined
84
 * within FreeRTOSConfig.h.
85
 */
86
 
87
#ifndef configUSE_PREEMPTION
88
        #error Missing definition:  configUSE_PREEMPTION should be defined in FreeRTOSConfig.h as either 1 or 0.  See the Configuration section of the FreeRTOS API documentation for details.
89
#endif
90
 
91
#ifndef configUSE_IDLE_HOOK
92
        #error Missing definition:  configUSE_IDLE_HOOK should be defined in FreeRTOSConfig.h as either 1 or 0.  See the Configuration section of the FreeRTOS API documentation for details.
93
#endif
94
 
95
#ifndef configUSE_TICK_HOOK
96
        #error Missing definition:  configUSE_TICK_HOOK should be defined in FreeRTOSConfig.h as either 1 or 0.  See the Configuration section of the FreeRTOS API documentation for details.
97
#endif
98
 
99
#ifndef configUSE_CO_ROUTINES
100
        #error  Missing definition:  configUSE_CO_ROUTINES should be defined in FreeRTOSConfig.h as either 1 or 0.  See the Configuration section of the FreeRTOS API documentation for details.
101
#endif
102
 
103
#ifndef INCLUDE_vTaskPrioritySet
104
        #error Missing definition:  INCLUDE_vTaskPrioritySet should be defined in FreeRTOSConfig.h as either 1 or 0.  See the Configuration section of the FreeRTOS API documentation for details.
105
#endif
106
 
107
#ifndef INCLUDE_uxTaskPriorityGet
108
        #error Missing definition:  INCLUDE_uxTaskPriorityGet should be defined in FreeRTOSConfig.h as either 1 or 0.  See the Configuration section of the FreeRTOS API documentation for details.
109
#endif
110
 
111
#ifndef INCLUDE_vTaskDelete             
112
        #error Missing definition:  INCLUDE_vTaskDelete          should be defined in FreeRTOSConfig.h as either 1 or 0.  See the Configuration section of the FreeRTOS API documentation for details.
113
#endif
114
 
115
#ifndef INCLUDE_vTaskCleanUpResources
116
        #error Missing definition:  INCLUDE_vTaskCleanUpResources should be defined in FreeRTOSConfig.h as either 1 or 0.  See the Configuration section of the FreeRTOS API documentation for details.
117
#endif
118
 
119
#ifndef INCLUDE_vTaskSuspend    
120
        #error Missing definition:  INCLUDE_vTaskSuspend         should be defined in FreeRTOSConfig.h as either 1 or 0.  See the Configuration section of the FreeRTOS API documentation for details.
121
#endif
122
 
123
#ifndef INCLUDE_vTaskDelayUntil
124
        #error Missing definition:  INCLUDE_vTaskDelayUntil should be defined in FreeRTOSConfig.h as either 1 or 0.  See the Configuration section of the FreeRTOS API documentation for details.
125
#endif
126
 
127
#ifndef INCLUDE_vTaskDelay
128
        #error Missing definition:  INCLUDE_vTaskDelay should be defined in FreeRTOSConfig.h as either 1 or 0.  See the Configuration section of the FreeRTOS API documentation for details.
129
#endif
130
 
131
#ifndef configUSE_16_BIT_TICKS
132
        #error Missing definition:  configUSE_16_BIT_TICKS should be defined in FreeRTOSConfig.h as either 1 or 0.  See the Configuration section of the FreeRTOS API documentation for details.
133
#endif
134
 
135
#ifndef configUSE_APPLICATION_TASK_TAG
136
        #define configUSE_APPLICATION_TASK_TAG 0
137
#endif
138
 
139
#ifndef INCLUDE_uxTaskGetStackHighWaterMark
140
        #define INCLUDE_uxTaskGetStackHighWaterMark 0
141
#endif
142
 
143
#ifndef configUSE_RECURSIVE_MUTEXES
144
        #define configUSE_RECURSIVE_MUTEXES 0
145
#endif
146
 
147
#ifndef configUSE_MUTEXES
148
        #define configUSE_MUTEXES 0
149
#endif
150
 
151
#ifndef configUSE_COUNTING_SEMAPHORES
152
        #define configUSE_COUNTING_SEMAPHORES 0
153
#endif
154
 
155
#ifndef configUSE_ALTERNATIVE_API
156
        #define configUSE_ALTERNATIVE_API 0
157
#endif
158
 
159
#ifndef portCRITICAL_NESTING_IN_TCB
160
        #define portCRITICAL_NESTING_IN_TCB 0
161
#endif
162
 
163
#ifndef configMAX_TASK_NAME_LEN
164
        #define configMAX_TASK_NAME_LEN 16
165
#endif
166
 
167
#ifndef configIDLE_SHOULD_YIELD
168
        #define configIDLE_SHOULD_YIELD         1
169
#endif
170
 
171
#if configMAX_TASK_NAME_LEN < 1
172
        #undef configMAX_TASK_NAME_LEN
173
        #define configMAX_TASK_NAME_LEN 1
174
#endif
175
 
176
#ifndef INCLUDE_xTaskResumeFromISR
177
        #define INCLUDE_xTaskResumeFromISR 1
178
#endif
179
 
180
#ifndef INCLUDE_xTaskGetSchedulerState
181
        #define INCLUDE_xTaskGetSchedulerState 0
182
#endif
183
 
184
#if ( configUSE_MUTEXES == 1 )
185
        /* xTaskGetCurrentTaskHandle is used by the priority inheritance mechanism
186
        within the mutex implementation so must be available if mutexes are used. */
187
        #undef INCLUDE_xTaskGetCurrentTaskHandle
188
        #define INCLUDE_xTaskGetCurrentTaskHandle 1
189
#else
190
        #ifndef INCLUDE_xTaskGetCurrentTaskHandle
191
                #define INCLUDE_xTaskGetCurrentTaskHandle 0
192
        #endif
193
#endif
194
 
195
 
196
#ifndef portSET_INTERRUPT_MASK_FROM_ISR
197
        #define portSET_INTERRUPT_MASK_FROM_ISR() 0
198
#endif
199
 
200
#ifndef portCLEAR_INTERRUPT_MASK_FROM_ISR
201
        #define portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedStatusValue ) ( void ) uxSavedStatusValue
202
#endif
203
 
204
 
205
#ifndef configQUEUE_REGISTRY_SIZE
206
        #define configQUEUE_REGISTRY_SIZE 0
207
#endif
208
 
209
#if configQUEUE_REGISTRY_SIZE < 1
210
        #define configQUEUE_REGISTRY_SIZE 0
211
        #define vQueueAddToRegistry( xQueue, pcName )
212
        #define vQueueUnregisterQueue( xQueue )
213
#endif
214
 
215
 
216
/* Remove any unused trace macros. */
217
#ifndef traceSTART
218
        /* Used to perform any necessary initialisation - for example, open a file
219
        into which trace is to be written. */
220
        #define traceSTART()
221
#endif
222
 
223
#ifndef traceEND
224
        /* Use to close a trace, for example close a file into which trace has been
225
        written. */
226
        #define traceEND()
227
#endif
228
 
229
#ifndef traceTASK_SWITCHED_IN
230
        /* Called after a task has been selected to run.  pxCurrentTCB holds a pointer
231
        to the task control block of the selected task. */
232
        #define traceTASK_SWITCHED_IN()
233
#endif
234
 
235
#ifndef traceTASK_SWITCHED_OUT
236
        /* Called before a task has been selected to run.  pxCurrentTCB holds a pointer
237
        to the task control block of the task being switched out. */
238
        #define traceTASK_SWITCHED_OUT()
239
#endif
240
 
241
#ifndef traceBLOCKING_ON_QUEUE_RECEIVE
242
        /* Task is about to block because it cannot read from a
243
        queue/mutex/semaphore.  pxQueue is a pointer to the queue/mutex/semaphore
244
        upon which the read was attempted.  pxCurrentTCB points to the TCB of the
245
        task that attempted the read. */
246
        #define traceBLOCKING_ON_QUEUE_RECEIVE( pxQueue )
247
#endif
248
 
249
#ifndef traceBLOCKING_ON_QUEUE_SEND
250
        /* Task is about to block because it cannot write to a
251
        queue/mutex/semaphore.  pxQueue is a pointer to the queue/mutex/semaphore
252
        upon which the write was attempted.  pxCurrentTCB points to the TCB of the
253
        task that attempted the write. */
254
        #define traceBLOCKING_ON_QUEUE_SEND( pxQueue )
255
#endif
256
 
257
#ifndef configCHECK_FOR_STACK_OVERFLOW
258
        #define configCHECK_FOR_STACK_OVERFLOW 0
259
#endif
260
 
261
/* The following event macros are embedded in the kernel API calls. */
262
 
263
#ifndef traceQUEUE_CREATE       
264
        #define traceQUEUE_CREATE( pxNewQueue )
265
#endif
266
 
267
#ifndef traceQUEUE_CREATE_FAILED
268
        #define traceQUEUE_CREATE_FAILED()
269
#endif
270
 
271
#ifndef traceCREATE_MUTEX
272
        #define traceCREATE_MUTEX( pxNewQueue )
273
#endif
274
 
275
#ifndef traceCREATE_MUTEX_FAILED
276
        #define traceCREATE_MUTEX_FAILED()
277
#endif
278
 
279
#ifndef traceGIVE_MUTEX_RECURSIVE
280
        #define traceGIVE_MUTEX_RECURSIVE( pxMutex )
281
#endif
282
 
283
#ifndef traceGIVE_MUTEX_RECURSIVE_FAILED
284
        #define traceGIVE_MUTEX_RECURSIVE_FAILED( pxMutex )
285
#endif
286
 
287
#ifndef traceTAKE_MUTEX_RECURSIVE
288
        #define traceTAKE_MUTEX_RECURSIVE( pxMutex )
289
#endif
290
 
291
#ifndef traceTAKE_MUTEX_RECURSIVE_FAILED
292
        #define traceTAKE_MUTEX_RECURSIVE_FAILED( pxMutex )
293
#endif
294
 
295
#ifndef traceCREATE_COUNTING_SEMAPHORE
296
        #define traceCREATE_COUNTING_SEMAPHORE()
297
#endif
298
 
299
#ifndef traceCREATE_COUNTING_SEMAPHORE_FAILED
300
        #define traceCREATE_COUNTING_SEMAPHORE_FAILED()
301
#endif
302
 
303
#ifndef traceQUEUE_SEND
304
        #define traceQUEUE_SEND( pxQueue )
305
#endif
306
 
307
#ifndef traceQUEUE_SEND_FAILED
308
        #define traceQUEUE_SEND_FAILED( pxQueue )
309
#endif
310
 
311
#ifndef traceQUEUE_RECEIVE
312
        #define traceQUEUE_RECEIVE( pxQueue )
313
#endif
314
 
315
#ifndef traceQUEUE_PEEK
316
        #define traceQUEUE_PEEK( pxQueue )
317
#endif
318
 
319
#ifndef traceQUEUE_RECEIVE_FAILED
320
        #define traceQUEUE_RECEIVE_FAILED( pxQueue )
321
#endif
322
 
323
#ifndef traceQUEUE_SEND_FROM_ISR
324
        #define traceQUEUE_SEND_FROM_ISR( pxQueue )
325
#endif
326
 
327
#ifndef traceQUEUE_SEND_FROM_ISR_FAILED
328
        #define traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue )
329
#endif
330
 
331
#ifndef traceQUEUE_RECEIVE_FROM_ISR
332
        #define traceQUEUE_RECEIVE_FROM_ISR( pxQueue )
333
#endif
334
 
335
#ifndef traceQUEUE_RECEIVE_FROM_ISR_FAILED
336
        #define traceQUEUE_RECEIVE_FROM_ISR_FAILED( pxQueue )
337
#endif
338
 
339
#ifndef traceQUEUE_DELETE
340
        #define traceQUEUE_DELETE( pxQueue )
341
#endif
342
 
343
#ifndef traceTASK_CREATE
344
        #define traceTASK_CREATE( pxNewTCB )
345
#endif
346
 
347
#ifndef traceTASK_CREATE_FAILED
348
        #define traceTASK_CREATE_FAILED()
349
#endif
350
 
351
#ifndef traceTASK_DELETE
352
        #define traceTASK_DELETE( pxTaskToDelete )
353
#endif
354
 
355
#ifndef traceTASK_DELAY_UNTIL
356
        #define traceTASK_DELAY_UNTIL()
357
#endif
358
 
359
#ifndef traceTASK_DELAY
360
        #define traceTASK_DELAY()
361
#endif
362
 
363
#ifndef traceTASK_PRIORITY_SET
364
        #define traceTASK_PRIORITY_SET( pxTask, uxNewPriority )
365
#endif
366
 
367
#ifndef traceTASK_SUSPEND
368
        #define traceTASK_SUSPEND( pxTaskToSuspend )
369
#endif
370
 
371
#ifndef traceTASK_RESUME
372
        #define traceTASK_RESUME( pxTaskToResume )
373
#endif
374
 
375
#ifndef traceTASK_RESUME_FROM_ISR
376
        #define traceTASK_RESUME_FROM_ISR( pxTaskToResume )
377
#endif
378
 
379
#ifndef traceTASK_INCREMENT_TICK
380
        #define traceTASK_INCREMENT_TICK( xTickCount )
381
#endif
382
 
383
#ifndef configGENERATE_RUN_TIME_STATS
384
        #define configGENERATE_RUN_TIME_STATS 0
385
#endif
386
 
387
#if ( configGENERATE_RUN_TIME_STATS == 1 )
388
 
389
        #ifndef portCONFIGURE_TIMER_FOR_RUN_TIME_STATS
390
                #error If configGENERATE_RUN_TIME_STATS is defined then portCONFIGURE_TIMER_FOR_RUN_TIME_STATS must also be defined.  portCONFIGURE_TIMER_FOR_RUN_TIME_STATS should call a port layer function to setup a peripheral timer/counter that can then be used as the run time counter time base.
391
        #endif /* portCONFIGURE_TIMER_FOR_RUN_TIME_STATS */
392
 
393
        #ifndef portGET_RUN_TIME_COUNTER_VALUE
394
                #ifndef portALT_GET_RUN_TIME_COUNTER_VALUE
395
                        #error If configGENERATE_RUN_TIME_STATS is defined then either portGET_RUN_TIME_COUNTER_VALUE or portALT_GET_RUN_TIME_COUNTER_VALUE must also be defined.  See the examples provided and the FreeRTOS web site for more information.
396
                #endif /* portALT_GET_RUN_TIME_COUNTER_VALUE */
397
        #endif /* portGET_RUN_TIME_COUNTER_VALUE */
398
 
399
#endif /* configGENERATE_RUN_TIME_STATS */
400
 
401
#ifndef portCONFIGURE_TIMER_FOR_RUN_TIME_STATS
402
        #define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS()
403
#endif
404
 
405
#ifndef configUSE_MALLOC_FAILED_HOOK
406
        #define configUSE_MALLOC_FAILED_HOOK 0
407
#endif
408
 
409
#ifndef portPRIVILEGE_BIT
410
        #define portPRIVILEGE_BIT ( ( unsigned portBASE_TYPE ) 0x00 )
411
#endif
412
 
413
#ifndef portYIELD_WITHIN_API
414
        #define portYIELD_WITHIN_API portYIELD
415
#endif
416
 
417
#ifndef pvPortMallocAligned
418
        #define pvPortMallocAligned( x, puxStackBuffer ) ( ( puxStackBuffer == NULL ) ? ( pvPortMalloc( x ) ) : ( puxStackBuffer ) )
419
#endif
420
 
421
#ifndef vPortFreeAligned
422
        #define vPortFreeAligned( pvBlockToFree ) vPortFree( pvBlockToFree )
423
#endif
424
 
425
#endif /* INC_FREERTOS_H */
426
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.