]> rtime.felk.cvut.cz Git - pes-rpp/rpp-test-sw.git/blob - rpp/lib/os/7.0.2_tms570/include/os/queue.h
Yet another place to fix
[pes-rpp/rpp-test-sw.git] / rpp / lib / os / 7.0.2_tms570 / include / os / queue.h
1 /*
2     FreeRTOS V7.0.2 - Copyright (C) 2011 Real Time Engineers Ltd.
3
4
5     ***************************************************************************
6      *                                                                       *
7      *    FreeRTOS tutorial books are available in pdf and paperback.        *
8      *    Complete, revised, and edited pdf reference manuals are also       *
9      *    available.                                                         *
10      *                                                                       *
11      *    Purchasing FreeRTOS documentation will not only help you, by       *
12      *    ensuring you get running as quickly as possible and with an        *
13      *    in-depth knowledge of how to use FreeRTOS, it will also help       *
14      *    the FreeRTOS project to continue with its mission of providing     *
15      *    professional grade, cross platform, de facto standard solutions    *
16      *    for microcontrollers - completely free of charge!                  *
17      *                                                                       *
18      *    >>> See http://www.FreeRTOS.org/Documentation for details. <<<     *
19      *                                                                       *
20      *    Thank you for using FreeRTOS, and thank you for your support!      *
21      *                                                                       *
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 modification to the GPL is included to allow you to
31     distribute a combined work that includes FreeRTOS without being obliged to
32     provide the source code for proprietary components outside of the FreeRTOS
33     kernel.  FreeRTOS is distributed in the hope that it will be useful, but
34     WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
35     or 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
55 #ifndef QUEUE_H
56 #define QUEUE_H
57
58 #ifndef INC_FREERTOS_H
59     #error "#include FreeRTOS.h" must appear in source files before "#include queue.h"
60 #endif
61
62 #ifdef __cplusplus
63 extern "C" {
64 #endif
65
66
67 #include "os/mpu_wrappers.h"
68
69 /**
70  * Type by which queues are referenced.  For example, a call to xQueueCreate
71  * returns (via a pointer parameter) an xQueueHandle variable that can then
72  * be used as a parameter to xQueueSend(), xQueueReceive(), etc.
73  */
74 typedef void * xQueueHandle;
75
76
77 /* For internal use only. */
78 #define queueSEND_TO_BACK   ( 0 )
79 #define queueSEND_TO_FRONT  ( 1 )
80
81
82 /**
83  * queue. h
84  * <pre>
85  xQueueHandle xQueueCreate(
86                               unsigned portBASE_TYPE uxQueueLength,
87                               unsigned portBASE_TYPE uxItemSize
88                           );
89  * </pre>
90  *
91  * Creates a new queue instance.  This allocates the storage required by the
92  * new queue and returns a handle for the queue.
93  *
94  * @param uxQueueLength The maximum number of items that the queue can contain.
95  *
96  * @param uxItemSize The number of bytes each item in the queue will require.
97  * Items are queued by copy, not by reference, so this is the number of bytes
98  * that will be copied for each posted item.  Each item on the queue must be
99  * the same size.
100  *
101  * @return If the queue is successfully create then a handle to the newly
102  * created queue is returned.  If the queue cannot be created then 0 is
103  * returned.
104  *
105  * Example usage:
106    <pre>
107  struct AMessage
108  {
109     char ucMessageID;
110     char ucData[ 20 ];
111  };
112
113  void vATask( void *pvParameters )
114  {
115  xQueueHandle xQueue1, xQueue2;
116
117     // Create a queue capable of containing 10 unsigned long values.
118     xQueue1 = xQueueCreate( 10, sizeof( unsigned long ) );
119     if( xQueue1 == 0 )
120     {
121         // Queue was not created and must not be used.
122     }
123
124     // Create a queue capable of containing 10 pointers to AMessage structures.
125     // These should be passed by pointer as they contain a lot of data.
126     xQueue2 = xQueueCreate( 10, sizeof( struct AMessage * ) );
127     if( xQueue2 == 0 )
128     {
129         // Queue was not created and must not be used.
130     }
131
132     // ... Rest of task code.
133  }
134  </pre>
135  * \defgroup xQueueCreate xQueueCreate
136  * \ingroup QueueManagement
137  */
138 xQueueHandle xQueueCreate( unsigned portBASE_TYPE uxQueueLength, unsigned portBASE_TYPE uxItemSize );
139
140 /**
141  * queue. h
142  * <pre>
143  portBASE_TYPE xQueueSendToToFront(
144                                    xQueueHandle xQueue,
145                                    const void   *   pvItemToQueue,
146                                    portTickType xTicksToWait
147                                );
148  * </pre>
149  *
150  * This is a macro that calls xQueueGenericSend().
151  *
152  * Post an item to the front of a queue.  The item is queued by copy, not by
153  * reference.  This function must not be called from an interrupt service
154  * routine.  See xQueueSendFromISR () for an alternative which may be used
155  * in an ISR.
156  *
157  * @param xQueue The handle to the queue on which the item is to be posted.
158  *
159  * @param pvItemToQueue A pointer to the item that is to be placed on the
160  * queue.  The size of the items the queue will hold was defined when the
161  * queue was created, so this many bytes will be copied from pvItemToQueue
162  * into the queue storage area.
163  *
164  * @param xTicksToWait The maximum amount of time the task should block
165  * waiting for space to become available on the queue, should it already
166  * be full.  The call will return immediately if this is set to 0 and the
167  * queue is full.  The time is defined in tick periods so the constant
168  * portTICK_RATE_MS should be used to convert to real time if this is required.
169  *
170  * @return pdTRUE if the item was successfully posted, otherwise errQUEUE_FULL.
171  *
172  * Example usage:
173    <pre>
174  struct AMessage
175  {
176     char ucMessageID;
177     char ucData[ 20 ];
178  } xMessage;
179
180  unsigned long ulVar = 10UL;
181
182  void vATask( void *pvParameters )
183  {
184  xQueueHandle xQueue1, xQueue2;
185  struct AMessage *pxMessage;
186
187     // Create a queue capable of containing 10 unsigned long values.
188     xQueue1 = xQueueCreate( 10, sizeof( unsigned long ) );
189
190     // Create a queue capable of containing 10 pointers to AMessage structures.
191     // These should be passed by pointer as they contain a lot of data.
192     xQueue2 = xQueueCreate( 10, sizeof( struct AMessage * ) );
193
194     // ...
195
196     if( xQueue1 != 0 )
197     {
198         // Send an unsigned long.  Wait for 10 ticks for space to become
199         // available if necessary.
200         if( xQueueSendToFront( xQueue1, ( void * ) &ulVar, ( portTickType ) 10 ) != pdPASS )
201         {
202             // Failed to post the message, even after 10 ticks.
203         }
204     }
205
206     if( xQueue2 != 0 )
207     {
208         // Send a pointer to a struct AMessage object.  Don't block if the
209         // queue is already full.
210         pxMessage = & xMessage;
211         xQueueSendToFront( xQueue2, ( void * ) &pxMessage, ( portTickType ) 0 );
212     }
213
214     // ... Rest of task code.
215  }
216  </pre>
217  * \defgroup xQueueSend xQueueSend
218  * \ingroup QueueManagement
219  */
220 #define xQueueSendToFront( xQueue, pvItemToQueue, xTicksToWait ) xQueueGenericSend( ( xQueue ), ( pvItemToQueue ), ( xTicksToWait ), queueSEND_TO_FRONT )
221
222 /**
223  * queue. h
224  * <pre>
225  portBASE_TYPE xQueueSendToBack(
226                                    xQueueHandle xQueue,
227                                    const    void    *   pvItemToQueue,
228                                    portTickType xTicksToWait
229                                );
230  * </pre>
231  *
232  * This is a macro that calls xQueueGenericSend().
233  *
234  * Post an item to the back of a queue.  The item is queued by copy, not by
235  * reference.  This function must not be called from an interrupt service
236  * routine.  See xQueueSendFromISR () for an alternative which may be used
237  * in an ISR.
238  *
239  * @param xQueue The handle to the queue on which the item is to be posted.
240  *
241  * @param pvItemToQueue A pointer to the item that is to be placed on the
242  * queue.  The size of the items the queue will hold was defined when the
243  * queue was created, so this many bytes will be copied from pvItemToQueue
244  * into the queue storage area.
245  *
246  * @param xTicksToWait The maximum amount of time the task should block
247  * waiting for space to become available on the queue, should it already
248  * be full.  The call will return immediately if this is set to 0 and the queue
249  * is full.  The  time is defined in tick periods so the constant
250  * portTICK_RATE_MS should be used to convert to real time if this is required.
251  *
252  * @return pdTRUE if the item was successfully posted, otherwise errQUEUE_FULL.
253  *
254  * Example usage:
255    <pre>
256  struct AMessage
257  {
258     char ucMessageID;
259     char ucData[ 20 ];
260  } xMessage;
261
262  unsigned long ulVar = 10UL;
263
264  void vATask( void *pvParameters )
265  {
266  xQueueHandle xQueue1, xQueue2;
267  struct AMessage *pxMessage;
268
269     // Create a queue capable of containing 10 unsigned long values.
270     xQueue1 = xQueueCreate( 10, sizeof( unsigned long ) );
271
272     // Create a queue capable of containing 10 pointers to AMessage structures.
273     // These should be passed by pointer as they contain a lot of data.
274     xQueue2 = xQueueCreate( 10, sizeof( struct AMessage * ) );
275
276     // ...
277
278     if( xQueue1 != 0 )
279     {
280         // Send an unsigned long.  Wait for 10 ticks for space to become
281         // available if necessary.
282         if( xQueueSendToBack( xQueue1, ( void * ) &ulVar, ( portTickType ) 10 ) != pdPASS )
283         {
284             // Failed to post the message, even after 10 ticks.
285         }
286     }
287
288     if( xQueue2 != 0 )
289     {
290         // Send a pointer to a struct AMessage object.  Don't block if the
291         // queue is already full.
292         pxMessage = & xMessage;
293         xQueueSendToBack( xQueue2, ( void * ) &pxMessage, ( portTickType ) 0 );
294     }
295
296     // ... Rest of task code.
297  }
298  </pre>
299  * \defgroup xQueueSend xQueueSend
300  * \ingroup QueueManagement
301  */
302 #define xQueueSendToBack( xQueue, pvItemToQueue, xTicksToWait ) xQueueGenericSend( ( xQueue ), ( pvItemToQueue ), ( xTicksToWait ), queueSEND_TO_BACK )
303
304 /**
305  * queue. h
306  * <pre>
307  portBASE_TYPE xQueueSend(
308                               xQueueHandle xQueue,
309                               const void * pvItemToQueue,
310                               portTickType xTicksToWait
311                          );
312  * </pre>
313  *
314  * This is a macro that calls xQueueGenericSend().  It is included for
315  * backward compatibility with versions of FreeRTOS.org that did not
316  * include the xQueueSendToFront() and xQueueSendToBack() macros.  It is
317  * equivalent to xQueueSendToBack().
318  *
319  * Post an item on a queue.  The item is queued by copy, not by reference.
320  * This function must not be called from an interrupt service routine.
321  * See xQueueSendFromISR () for an alternative which may be used in an ISR.
322  *
323  * @param xQueue The handle to the queue on which the item is to be posted.
324  *
325  * @param pvItemToQueue A pointer to the item that is to be placed on the
326  * queue.  The size of the items the queue will hold was defined when the
327  * queue was created, so this many bytes will be copied from pvItemToQueue
328  * into the queue storage area.
329  *
330  * @param xTicksToWait The maximum amount of time the task should block
331  * waiting for space to become available on the queue, should it already
332  * be full.  The call will return immediately if this is set to 0 and the
333  * queue is full.  The time is defined in tick periods so the constant
334  * portTICK_RATE_MS should be used to convert to real time if this is required.
335  *
336  * @return pdTRUE if the item was successfully posted, otherwise errQUEUE_FULL.
337  *
338  * Example usage:
339    <pre>
340  struct AMessage
341  {
342     char ucMessageID;
343     char ucData[ 20 ];
344  } xMessage;
345
346  unsigned long ulVar = 10UL;
347
348  void vATask( void *pvParameters )
349  {
350  xQueueHandle xQueue1, xQueue2;
351  struct AMessage *pxMessage;
352
353     // Create a queue capable of containing 10 unsigned long values.
354     xQueue1 = xQueueCreate( 10, sizeof( unsigned long ) );
355
356     // Create a queue capable of containing 10 pointers to AMessage structures.
357     // These should be passed by pointer as they contain a lot of data.
358     xQueue2 = xQueueCreate( 10, sizeof( struct AMessage * ) );
359
360     // ...
361
362     if( xQueue1 != 0 )
363     {
364         // Send an unsigned long.  Wait for 10 ticks for space to become
365         // available if necessary.
366         if( xQueueSend( xQueue1, ( void * ) &ulVar, ( portTickType ) 10 ) != pdPASS )
367         {
368             // Failed to post the message, even after 10 ticks.
369         }
370     }
371
372     if( xQueue2 != 0 )
373     {
374         // Send a pointer to a struct AMessage object.  Don't block if the
375         // queue is already full.
376         pxMessage = & xMessage;
377         xQueueSend( xQueue2, ( void * ) &pxMessage, ( portTickType ) 0 );
378     }
379
380     // ... Rest of task code.
381  }
382  </pre>
383  * \defgroup xQueueSend xQueueSend
384  * \ingroup QueueManagement
385  */
386 #define xQueueSend( xQueue, pvItemToQueue, xTicksToWait ) xQueueGenericSend( ( xQueue ), ( pvItemToQueue ), ( xTicksToWait ), queueSEND_TO_BACK )
387
388
389 /**
390  * queue. h
391  * <pre>
392  portBASE_TYPE xQueueGenericSend(
393                                     xQueueHandle xQueue,
394                                     const void * pvItemToQueue,
395                                     portTickType xTicksToWait
396                                     portBASE_TYPE xCopyPosition
397                                 );
398  * </pre>
399  *
400  * It is preferred that the macros xQueueSend(), xQueueSendToFront() and
401  * xQueueSendToBack() are used in place of calling this function directly.
402  *
403  * Post an item on a queue.  The item is queued by copy, not by reference.
404  * This function must not be called from an interrupt service routine.
405  * See xQueueSendFromISR () for an alternative which may be used in an ISR.
406  *
407  * @param xQueue The handle to the queue on which the item is to be posted.
408  *
409  * @param pvItemToQueue A pointer to the item that is to be placed on the
410  * queue.  The size of the items the queue will hold was defined when the
411  * queue was created, so this many bytes will be copied from pvItemToQueue
412  * into the queue storage area.
413  *
414  * @param xTicksToWait The maximum amount of time the task should block
415  * waiting for space to become available on the queue, should it already
416  * be full.  The call will return immediately if this is set to 0 and the
417  * queue is full.  The time is defined in tick periods so the constant
418  * portTICK_RATE_MS should be used to convert to real time if this is required.
419  *
420  * @param xCopyPosition Can take the value queueSEND_TO_BACK to place the
421  * item at the back of the queue, or queueSEND_TO_FRONT to place the item
422  * at the front of the queue (for high priority messages).
423  *
424  * @return pdTRUE if the item was successfully posted, otherwise errQUEUE_FULL.
425  *
426  * Example usage:
427    <pre>
428  struct AMessage
429  {
430     char ucMessageID;
431     char ucData[ 20 ];
432  } xMessage;
433
434  unsigned long ulVar = 10UL;
435
436  void vATask( void *pvParameters )
437  {
438  xQueueHandle xQueue1, xQueue2;
439  struct AMessage *pxMessage;
440
441     // Create a queue capable of containing 10 unsigned long values.
442     xQueue1 = xQueueCreate( 10, sizeof( unsigned long ) );
443
444     // Create a queue capable of containing 10 pointers to AMessage structures.
445     // These should be passed by pointer as they contain a lot of data.
446     xQueue2 = xQueueCreate( 10, sizeof( struct AMessage * ) );
447
448     // ...
449
450     if( xQueue1 != 0 )
451     {
452         // Send an unsigned long.  Wait for 10 ticks for space to become
453         // available if necessary.
454         if( xQueueGenericSend( xQueue1, ( void * ) &ulVar, ( portTickType ) 10, queueSEND_TO_BACK ) != pdPASS )
455         {
456             // Failed to post the message, even after 10 ticks.
457         }
458     }
459
460     if( xQueue2 != 0 )
461     {
462         // Send a pointer to a struct AMessage object.  Don't block if the
463         // queue is already full.
464         pxMessage = & xMessage;
465         xQueueGenericSend( xQueue2, ( void * ) &pxMessage, ( portTickType ) 0, queueSEND_TO_BACK );
466     }
467
468     // ... Rest of task code.
469  }
470  </pre>
471  * \defgroup xQueueSend xQueueSend
472  * \ingroup QueueManagement
473  */
474 signed portBASE_TYPE xQueueGenericSend( xQueueHandle pxQueue, const void * const pvItemToQueue, portTickType xTicksToWait, portBASE_TYPE xCopyPosition );
475
476 /**
477  * queue. h
478  * <pre>
479  portBASE_TYPE xQueuePeek(
480                              xQueueHandle xQueue,
481                              void *pvBuffer,
482                              portTickType xTicksToWait
483                          );</pre>
484  *
485  * This is a macro that calls the xQueueGenericReceive() function.
486  *
487  * Receive an item from a queue without removing the item from the queue.
488  * The item is received by copy so a buffer of adequate size must be
489  * provided.  The number of bytes copied into the buffer was defined when
490  * the queue was created.
491  *
492  * Successfully received items remain on the queue so will be returned again
493  * by the next call, or a call to xQueueReceive().
494  *
495  * This macro must not be used in an interrupt service routine.
496  *
497  * @param pxQueue The handle to the queue from which the item is to be
498  * received.
499  *
500  * @param pvBuffer Pointer to the buffer into which the received item will
501  * be copied.
502  *
503  * @param xTicksToWait The maximum amount of time the task should block
504  * waiting for an item to receive should the queue be empty at the time
505  * of the call.  The time is defined in tick periods so the constant
506  * portTICK_RATE_MS should be used to convert to real time if this is required.
507  * xQueuePeek() will return immediately if xTicksToWait is 0 and the queue
508  * is empty.
509  *
510  * @return pdTRUE if an item was successfully received from the queue,
511  * otherwise pdFALSE.
512  *
513  * Example usage:
514    <pre>
515  struct AMessage
516  {
517     char ucMessageID;
518     char ucData[ 20 ];
519  } xMessage;
520
521  xQueueHandle xQueue;
522
523  // Task to create a queue and post a value.
524  void vATask( void *pvParameters )
525  {
526  struct AMessage *pxMessage;
527
528     // Create a queue capable of containing 10 pointers to AMessage structures.
529     // These should be passed by pointer as they contain a lot of data.
530     xQueue = xQueueCreate( 10, sizeof( struct AMessage * ) );
531     if( xQueue == 0 )
532     {
533         // Failed to create the queue.
534     }
535
536     // ...
537
538     // Send a pointer to a struct AMessage object.  Don't block if the
539     // queue is already full.
540     pxMessage = & xMessage;
541     xQueueSend( xQueue, ( void * ) &pxMessage, ( portTickType ) 0 );
542
543     // ... Rest of task code.
544  }
545
546  // Task to peek the data from the queue.
547  void vADifferentTask( void *pvParameters )
548  {
549  struct AMessage *pxRxedMessage;
550
551     if( xQueue != 0 )
552     {
553         // Peek a message on the created queue.  Block for 10 ticks if a
554         // message is not immediately available.
555         if( xQueuePeek( xQueue, &( pxRxedMessage ), ( portTickType ) 10 ) )
556         {
557             // pcRxedMessage now points to the struct AMessage variable posted
558             // by vATask, but the item still remains on the queue.
559         }
560     }
561
562     // ... Rest of task code.
563  }
564  </pre>
565  * \defgroup xQueueReceive xQueueReceive
566  * \ingroup QueueManagement
567  */
568 #define xQueuePeek( xQueue, pvBuffer, xTicksToWait ) xQueueGenericReceive( ( xQueue ), ( pvBuffer ), ( xTicksToWait ), pdTRUE )
569
570 /**
571  * queue. h
572  * <pre>
573  portBASE_TYPE xQueueReceive(
574                                  xQueueHandle xQueue,
575                                  void *pvBuffer,
576                                  portTickType xTicksToWait
577                             );</pre>
578  *
579  * This is a macro that calls the xQueueGenericReceive() function.
580  *
581  * Receive an item from a queue.  The item is received by copy so a buffer of
582  * adequate size must be provided.  The number of bytes copied into the buffer
583  * was defined when the queue was created.
584  *
585  * Successfully received items are removed from the queue.
586  *
587  * This function must not be used in an interrupt service routine.  See
588  * xQueueReceiveFromISR for an alternative that can.
589  *
590  * @param pxQueue The handle to the queue from which the item is to be
591  * received.
592  *
593  * @param pvBuffer Pointer to the buffer into which the received item will
594  * be copied.
595  *
596  * @param xTicksToWait The maximum amount of time the task should block
597  * waiting for an item to receive should the queue be empty at the time
598  * of the call.  xQueueReceive() will return immediately if xTicksToWait
599  * is zero and the queue is empty.  The time is defined in tick periods so the
600  * constant portTICK_RATE_MS should be used to convert to real time if this is
601  * required.
602  *
603  * @return pdTRUE if an item was successfully received from the queue,
604  * otherwise pdFALSE.
605  *
606  * Example usage:
607    <pre>
608  struct AMessage
609  {
610     char ucMessageID;
611     char ucData[ 20 ];
612  } xMessage;
613
614  xQueueHandle xQueue;
615
616  // Task to create a queue and post a value.
617  void vATask( void *pvParameters )
618  {
619  struct AMessage *pxMessage;
620
621     // Create a queue capable of containing 10 pointers to AMessage structures.
622     // These should be passed by pointer as they contain a lot of data.
623     xQueue = xQueueCreate( 10, sizeof( struct AMessage * ) );
624     if( xQueue == 0 )
625     {
626         // Failed to create the queue.
627     }
628
629     // ...
630
631     // Send a pointer to a struct AMessage object.  Don't block if the
632     // queue is already full.
633     pxMessage = & xMessage;
634     xQueueSend( xQueue, ( void * ) &pxMessage, ( portTickType ) 0 );
635
636     // ... Rest of task code.
637  }
638
639  // Task to receive from the queue.
640  void vADifferentTask( void *pvParameters )
641  {
642  struct AMessage *pxRxedMessage;
643
644     if( xQueue != 0 )
645     {
646         // Receive a message on the created queue.  Block for 10 ticks if a
647         // message is not immediately available.
648         if( xQueueReceive( xQueue, &( pxRxedMessage ), ( portTickType ) 10 ) )
649         {
650             // pcRxedMessage now points to the struct AMessage variable posted
651             // by vATask.
652         }
653     }
654
655     // ... Rest of task code.
656  }
657  </pre>
658  * \defgroup xQueueReceive xQueueReceive
659  * \ingroup QueueManagement
660  */
661 #define xQueueReceive( xQueue, pvBuffer, xTicksToWait ) xQueueGenericReceive( ( xQueue ), ( pvBuffer ), ( xTicksToWait ), pdFALSE )
662
663
664 /**
665  * queue. h
666  * <pre>
667  portBASE_TYPE xQueueGenericReceive(
668                                        xQueueHandle xQueue,
669                                        void *pvBuffer,
670                                        portTickType xTicksToWait
671                                        portBASE_TYPE    xJustPeek
672                                     );</pre>
673  *
674  * It is preferred that the macro xQueueReceive() be used rather than calling
675  * this function directly.
676  *
677  * Receive an item from a queue.  The item is received by copy so a buffer of
678  * adequate size must be provided.  The number of bytes copied into the buffer
679  * was defined when the queue was created.
680  *
681  * This function must not be used in an interrupt service routine.  See
682  * xQueueReceiveFromISR for an alternative that can.
683  *
684  * @param pxQueue The handle to the queue from which the item is to be
685  * received.
686  *
687  * @param pvBuffer Pointer to the buffer into which the received item will
688  * be copied.
689  *
690  * @param xTicksToWait The maximum amount of time the task should block
691  * waiting for an item to receive should the queue be empty at the time
692  * of the call.  The time is defined in tick periods so the constant
693  * portTICK_RATE_MS should be used to convert to real time if this is required.
694  * xQueueGenericReceive() will return immediately if the queue is empty and
695  * xTicksToWait is 0.
696  *
697  * @param xJustPeek When set to true, the item received from the queue is not
698  * actually removed from the queue - meaning a subsequent call to
699  * xQueueReceive() will return the same item.  When set to false, the item
700  * being received from the queue is also removed from the queue.
701  *
702  * @return pdTRUE if an item was successfully received from the queue,
703  * otherwise pdFALSE.
704  *
705  * Example usage:
706    <pre>
707  struct AMessage
708  {
709     char ucMessageID;
710     char ucData[ 20 ];
711  } xMessage;
712
713  xQueueHandle xQueue;
714
715  // Task to create a queue and post a value.
716  void vATask( void *pvParameters )
717  {
718  struct AMessage *pxMessage;
719
720     // Create a queue capable of containing 10 pointers to AMessage structures.
721     // These should be passed by pointer as they contain a lot of data.
722     xQueue = xQueueCreate( 10, sizeof( struct AMessage * ) );
723     if( xQueue == 0 )
724     {
725         // Failed to create the queue.
726     }
727
728     // ...
729
730     // Send a pointer to a struct AMessage object.  Don't block if the
731     // queue is already full.
732     pxMessage = & xMessage;
733     xQueueSend( xQueue, ( void * ) &pxMessage, ( portTickType ) 0 );
734
735     // ... Rest of task code.
736  }
737
738  // Task to receive from the queue.
739  void vADifferentTask( void *pvParameters )
740  {
741  struct AMessage *pxRxedMessage;
742
743     if( xQueue != 0 )
744     {
745         // Receive a message on the created queue.  Block for 10 ticks if a
746         // message is not immediately available.
747         if( xQueueGenericReceive( xQueue, &( pxRxedMessage ), ( portTickType ) 10 ) )
748         {
749             // pcRxedMessage now points to the struct AMessage variable posted
750             // by vATask.
751         }
752     }
753
754     // ... Rest of task code.
755  }
756  </pre>
757  * \defgroup xQueueReceive xQueueReceive
758  * \ingroup QueueManagement
759  */
760 signed portBASE_TYPE xQueueGenericReceive( xQueueHandle xQueue, void * const pvBuffer, portTickType xTicksToWait, portBASE_TYPE xJustPeek );
761
762 /**
763  * queue. h
764  * <pre>unsigned portBASE_TYPE uxQueueMessagesWaiting( const xQueueHandle xQueue );</pre>
765  *
766  * Return the number of messages stored in a queue.
767  *
768  * @param xQueue A handle to the queue being queried.
769  *
770  * @return The number of messages available in the queue.
771  *
772  * \page uxQueueMessagesWaiting uxQueueMessagesWaiting
773  * \ingroup QueueManagement
774  */
775 unsigned portBASE_TYPE uxQueueMessagesWaiting( const xQueueHandle xQueue );
776
777 /**
778  * queue. h
779  * <pre>void vQueueDelete( xQueueHandle xQueue );</pre>
780  *
781  * Delete a queue - freeing all the memory allocated for storing of items
782  * placed on the queue.
783  *
784  * @param xQueue A handle to the queue to be deleted.
785  *
786  * \page vQueueDelete vQueueDelete
787  * \ingroup QueueManagement
788  */
789 void vQueueDelete( xQueueHandle pxQueue );
790
791 /**
792  * queue. h
793  * <pre>
794  portBASE_TYPE xQueueSendToFrontFromISR(
795                                          xQueueHandle pxQueue,
796                                          const void *pvItemToQueue,
797                                          portBASE_TYPE *pxHigherPriorityTaskWoken
798                                       );
799  </pre>
800  *
801  * This is a macro that calls xQueueGenericSendFromISR().
802  *
803  * Post an item to the front of a queue.  It is safe to use this macro from
804  * within an interrupt service routine.
805  *
806  * Items are queued by copy not reference so it is preferable to only
807  * queue small items, especially when called from an ISR.  In most cases
808  * it would be preferable to store a pointer to the item being queued.
809  *
810  * @param xQueue The handle to the queue on which the item is to be posted.
811  *
812  * @param pvItemToQueue A pointer to the item that is to be placed on the
813  * queue.  The size of the items the queue will hold was defined when the
814  * queue was created, so this many bytes will be copied from pvItemToQueue
815  * into the queue storage area.
816  *
817  * @param pxHigherPriorityTaskWoken xQueueSendToFrontFromISR() will set
818  * *pxHigherPriorityTaskWoken to pdTRUE if sending to the queue caused a task
819  * to unblock, and the unblocked task has a priority higher than the currently
820  * running task.  If xQueueSendToFromFromISR() sets this value to pdTRUE then
821  * a context switch should be requested before the interrupt is exited.
822  *
823  * @return pdTRUE if the data was successfully sent to the queue, otherwise
824  * errQUEUE_FULL.
825  *
826  * Example usage for buffered IO (where the ISR can obtain more than one value
827  * per call):
828    <pre>
829  void vBufferISR( void )
830  {
831  char cIn;
832  portBASE_TYPE xHigherPrioritTaskWoken;
833
834     // We have not woken a task at the start of the ISR.
835     xHigherPriorityTaskWoken = pdFALSE;
836
837     // Loop until the buffer is empty.
838     do
839     {
840         // Obtain a byte from the buffer.
841         cIn = portINPUT_BYTE( RX_REGISTER_ADDRESS );
842
843         // Post the byte.
844         xQueueSendToFrontFromISR( xRxQueue, &cIn, &xHigherPriorityTaskWoken );
845
846     } while( portINPUT_BYTE( BUFFER_COUNT ) );
847
848     // Now the buffer is empty we can switch context if necessary.
849     if( xHigherPriorityTaskWoken )
850     {
851         taskYIELD ();
852     }
853  }
854  </pre>
855  *
856  * \defgroup xQueueSendFromISR xQueueSendFromISR
857  * \ingroup QueueManagement
858  */
859 #define xQueueSendToFrontFromISR( pxQueue, pvItemToQueue, pxHigherPriorityTaskWoken ) xQueueGenericSendFromISR( ( pxQueue ), ( pvItemToQueue ), ( pxHigherPriorityTaskWoken ), queueSEND_TO_FRONT )
860
861
862 /**
863  * queue. h
864  * <pre>
865  portBASE_TYPE xQueueSendToBackFromISR(
866                                          xQueueHandle pxQueue,
867                                          const void *pvItemToQueue,
868                                          portBASE_TYPE *pxHigherPriorityTaskWoken
869                                       );
870  </pre>
871  *
872  * This is a macro that calls xQueueGenericSendFromISR().
873  *
874  * Post an item to the back of a queue.  It is safe to use this macro from
875  * within an interrupt service routine.
876  *
877  * Items are queued by copy not reference so it is preferable to only
878  * queue small items, especially when called from an ISR.  In most cases
879  * it would be preferable to store a pointer to the item being queued.
880  *
881  * @param xQueue The handle to the queue on which the item is to be posted.
882  *
883  * @param pvItemToQueue A pointer to the item that is to be placed on the
884  * queue.  The size of the items the queue will hold was defined when the
885  * queue was created, so this many bytes will be copied from pvItemToQueue
886  * into the queue storage area.
887  *
888  * @param pxHigherPriorityTaskWoken xQueueSendToBackFromISR() will set
889  * *pxHigherPriorityTaskWoken to pdTRUE if sending to the queue caused a task
890  * to unblock, and the unblocked task has a priority higher than the currently
891  * running task.  If xQueueSendToBackFromISR() sets this value to pdTRUE then
892  * a context switch should be requested before the interrupt is exited.
893  *
894  * @return pdTRUE if the data was successfully sent to the queue, otherwise
895  * errQUEUE_FULL.
896  *
897  * Example usage for buffered IO (where the ISR can obtain more than one value
898  * per call):
899    <pre>
900  void vBufferISR( void )
901  {
902  char cIn;
903  portBASE_TYPE xHigherPriorityTaskWoken;
904
905     // We have not woken a task at the start of the ISR.
906     xHigherPriorityTaskWoken = pdFALSE;
907
908     // Loop until the buffer is empty.
909     do
910     {
911         // Obtain a byte from the buffer.
912         cIn = portINPUT_BYTE( RX_REGISTER_ADDRESS );
913
914         // Post the byte.
915         xQueueSendToBackFromISR( xRxQueue, &cIn, &xHigherPriorityTaskWoken );
916
917     } while( portINPUT_BYTE( BUFFER_COUNT ) );
918
919     // Now the buffer is empty we can switch context if necessary.
920     if( xHigherPriorityTaskWoken )
921     {
922         taskYIELD ();
923     }
924  }
925  </pre>
926  *
927  * \defgroup xQueueSendFromISR xQueueSendFromISR
928  * \ingroup QueueManagement
929  */
930 #define xQueueSendToBackFromISR( pxQueue, pvItemToQueue, pxHigherPriorityTaskWoken ) xQueueGenericSendFromISR( ( pxQueue ), ( pvItemToQueue ), ( pxHigherPriorityTaskWoken ), queueSEND_TO_BACK )
931
932 /**
933  * queue. h
934  * <pre>
935  portBASE_TYPE xQueueSendFromISR(
936                                      xQueueHandle pxQueue,
937                                      const void *pvItemToQueue,
938                                      portBASE_TYPE *pxHigherPriorityTaskWoken
939                                 );
940  </pre>
941  *
942  * This is a macro that calls xQueueGenericSendFromISR().  It is included
943  * for backward compatibility with versions of FreeRTOS.org that did not
944  * include the xQueueSendToBackFromISR() and xQueueSendToFrontFromISR()
945  * macros.
946  *
947  * Post an item to the back of a queue.  It is safe to use this function from
948  * within an interrupt service routine.
949  *
950  * Items are queued by copy not reference so it is preferable to only
951  * queue small items, especially when called from an ISR.  In most cases
952  * it would be preferable to store a pointer to the item being queued.
953  *
954  * @param xQueue The handle to the queue on which the item is to be posted.
955  *
956  * @param pvItemToQueue A pointer to the item that is to be placed on the
957  * queue.  The size of the items the queue will hold was defined when the
958  * queue was created, so this many bytes will be copied from pvItemToQueue
959  * into the queue storage area.
960  *
961  * @param pxHigherPriorityTaskWoken xQueueSendFromISR() will set
962  * *pxHigherPriorityTaskWoken to pdTRUE if sending to the queue caused a task
963  * to unblock, and the unblocked task has a priority higher than the currently
964  * running task.  If xQueueSendFromISR() sets this value to pdTRUE then
965  * a context switch should be requested before the interrupt is exited.
966  *
967  * @return pdTRUE if the data was successfully sent to the queue, otherwise
968  * errQUEUE_FULL.
969  *
970  * Example usage for buffered IO (where the ISR can obtain more than one value
971  * per call):
972    <pre>
973  void vBufferISR( void )
974  {
975  char cIn;
976  portBASE_TYPE xHigherPriorityTaskWoken;
977
978     // We have not woken a task at the start of the ISR.
979     xHigherPriorityTaskWoken = pdFALSE;
980
981     // Loop until the buffer is empty.
982     do
983     {
984         // Obtain a byte from the buffer.
985         cIn = portINPUT_BYTE( RX_REGISTER_ADDRESS );
986
987         // Post the byte.
988         xQueueSendFromISR( xRxQueue, &cIn, &xHigherPriorityTaskWoken );
989
990     } while( portINPUT_BYTE( BUFFER_COUNT ) );
991
992     // Now the buffer is empty we can switch context if necessary.
993     if( xHigherPriorityTaskWoken )
994     {
995         // Actual macro used here is port specific.
996         taskYIELD_FROM_ISR ();
997     }
998  }
999  </pre>
1000  *
1001  * \defgroup xQueueSendFromISR xQueueSendFromISR
1002  * \ingroup QueueManagement
1003  */
1004 #define xQueueSendFromISR( pxQueue, pvItemToQueue, pxHigherPriorityTaskWoken ) xQueueGenericSendFromISR( ( pxQueue ), ( pvItemToQueue ), ( pxHigherPriorityTaskWoken ), queueSEND_TO_BACK )
1005
1006 /**
1007  * queue. h
1008  * <pre>
1009  portBASE_TYPE xQueueGenericSendFromISR(
1010                                            xQueueHandle pxQueue,
1011                                            const    void    *pvItemToQueue,
1012                                            portBASE_TYPE    *pxHigherPriorityTaskWoken,
1013                                            portBASE_TYPE    xCopyPosition
1014                                        );
1015  </pre>
1016  *
1017  * It is preferred that the macros xQueueSendFromISR(),
1018  * xQueueSendToFrontFromISR() and xQueueSendToBackFromISR() be used in place
1019  * of calling this function directly.
1020  *
1021  * Post an item on a queue.  It is safe to use this function from within an
1022  * interrupt service routine.
1023  *
1024  * Items are queued by copy not reference so it is preferable to only
1025  * queue small items, especially when called from an ISR.  In most cases
1026  * it would be preferable to store a pointer to the item being queued.
1027  *
1028  * @param xQueue The handle to the queue on which the item is to be posted.
1029  *
1030  * @param pvItemToQueue A pointer to the item that is to be placed on the
1031  * queue.  The size of the items the queue will hold was defined when the
1032  * queue was created, so this many bytes will be copied from pvItemToQueue
1033  * into the queue storage area.
1034  *
1035  * @param pxHigherPriorityTaskWoken xQueueGenericSendFromISR() will set
1036  * *pxHigherPriorityTaskWoken to pdTRUE if sending to the queue caused a task
1037  * to unblock, and the unblocked task has a priority higher than the currently
1038  * running task.  If xQueueGenericSendFromISR() sets this value to pdTRUE then
1039  * a context switch should be requested before the interrupt is exited.
1040  *
1041  * @param xCopyPosition Can take the value queueSEND_TO_BACK to place the
1042  * item at the back of the queue, or queueSEND_TO_FRONT to place the item
1043  * at the front of the queue (for high priority messages).
1044  *
1045  * @return pdTRUE if the data was successfully sent to the queue, otherwise
1046  * errQUEUE_FULL.
1047  *
1048  * Example usage for buffered IO (where the ISR can obtain more than one value
1049  * per call):
1050    <pre>
1051  void vBufferISR( void )
1052  {
1053  char cIn;
1054  portBASE_TYPE xHigherPriorityTaskWokenByPost;
1055
1056     // We have not woken a task at the start of the ISR.
1057     xHigherPriorityTaskWokenByPost = pdFALSE;
1058
1059     // Loop until the buffer is empty.
1060     do
1061     {
1062         // Obtain a byte from the buffer.
1063         cIn = portINPUT_BYTE( RX_REGISTER_ADDRESS );
1064
1065         // Post each byte.
1066         xQueueGenericSendFromISR( xRxQueue, &cIn, &xHigherPriorityTaskWokenByPost, queueSEND_TO_BACK );
1067
1068     } while( portINPUT_BYTE( BUFFER_COUNT ) );
1069
1070     // Now the buffer is empty we can switch context if necessary.  Note that the
1071     // name of the yield function required is port specific.
1072     if( xHigherPriorityTaskWokenByPost )
1073     {
1074         taskYIELD_YIELD_FROM_ISR();
1075     }
1076  }
1077  </pre>
1078  *
1079  * \defgroup xQueueSendFromISR xQueueSendFromISR
1080  * \ingroup QueueManagement
1081  */
1082 signed portBASE_TYPE xQueueGenericSendFromISR( xQueueHandle pxQueue, const void * const pvItemToQueue, signed portBASE_TYPE *pxHigherPriorityTaskWoken, portBASE_TYPE xCopyPosition );
1083
1084 /**
1085  * queue. h
1086  * <pre>
1087  portBASE_TYPE xQueueReceiveFromISR(
1088                                        xQueueHandle pxQueue,
1089                                        void *pvBuffer,
1090                                        portBASE_TYPE    *pxTaskWoken
1091                                    );
1092  * </pre>
1093  *
1094  * Receive an item from a queue.  It is safe to use this function from within an
1095  * interrupt service routine.
1096  *
1097  * @param pxQueue The handle to the queue from which the item is to be
1098  * received.
1099  *
1100  * @param pvBuffer Pointer to the buffer into which the received item will
1101  * be copied.
1102  *
1103  * @param pxTaskWoken A task may be blocked waiting for space to become
1104  * available on the queue.  If xQueueReceiveFromISR causes such a task to
1105  * unblock *pxTaskWoken will get set to pdTRUE, otherwise *pxTaskWoken will
1106  * remain unchanged.
1107  *
1108  * @return pdTRUE if an item was successfully received from the queue,
1109  * otherwise pdFALSE.
1110  *
1111  * Example usage:
1112    <pre>
1113
1114  xQueueHandle xQueue;
1115
1116  // Function to create a queue and post some values.
1117  void vAFunction( void *pvParameters )
1118  {
1119  char cValueToPost;
1120  const portTickType xBlockTime = ( portTickType )0xff;
1121
1122     // Create a queue capable of containing 10 characters.
1123     xQueue = xQueueCreate( 10, sizeof( char ) );
1124     if( xQueue == 0 )
1125     {
1126         // Failed to create the queue.
1127     }
1128
1129     // ...
1130
1131     // Post some characters that will be used within an ISR.  If the queue
1132     // is full then this task will block for xBlockTime ticks.
1133     cValueToPost = 'a';
1134     xQueueSend( xQueue, ( void * ) &cValueToPost, xBlockTime );
1135     cValueToPost = 'b';
1136     xQueueSend( xQueue, ( void * ) &cValueToPost, xBlockTime );
1137
1138     // ... keep posting characters ... this task may block when the queue
1139     // becomes full.
1140
1141     cValueToPost = 'c';
1142     xQueueSend( xQueue, ( void * ) &cValueToPost, xBlockTime );
1143  }
1144
1145  // ISR that outputs all the characters received on the queue.
1146  void vISR_Routine( void )
1147  {
1148  portBASE_TYPE xTaskWokenByReceive = pdFALSE;
1149  char cRxedChar;
1150
1151     while( xQueueReceiveFromISR( xQueue, ( void * ) &cRxedChar, &xTaskWokenByReceive) )
1152     {
1153         // A character was received.  Output the character now.
1154         vOutputCharacter( cRxedChar );
1155
1156         // If removing the character from the queue woke the task that was
1157         // posting onto the queue cTaskWokenByReceive will have been set to
1158         // pdTRUE.  No matter how many times this loop iterates only one
1159         // task will be woken.
1160     }
1161
1162     if( cTaskWokenByPost != ( char ) pdFALSE;
1163     {
1164         taskYIELD ();
1165     }
1166  }
1167  </pre>
1168  * \defgroup xQueueReceiveFromISR xQueueReceiveFromISR
1169  * \ingroup QueueManagement
1170  */
1171 signed portBASE_TYPE xQueueReceiveFromISR( xQueueHandle pxQueue, void * const pvBuffer, signed portBASE_TYPE *pxTaskWoken );
1172
1173 /*
1174  * Utilities to query queue that are safe to use from an ISR.  These utilities
1175  * should be used only from witin an ISR, or within a critical section.
1176  */
1177 signed portBASE_TYPE xQueueIsQueueEmptyFromISR( const xQueueHandle pxQueue );
1178 signed portBASE_TYPE xQueueIsQueueFullFromISR( const xQueueHandle pxQueue );
1179 unsigned portBASE_TYPE uxQueueMessagesWaitingFromISR( const xQueueHandle pxQueue );
1180
1181
1182 /*
1183  * xQueueAltGenericSend() is an alternative version of xQueueGenericSend().
1184  * Likewise xQueueAltGenericReceive() is an alternative version of
1185  * xQueueGenericReceive().
1186  *
1187  * The source code that implements the alternative (Alt) API is much
1188  * simpler  because it executes everything from within a critical section.
1189  * This is  the approach taken by many other RTOSes, but FreeRTOS.org has the
1190  * preferred fully featured API too.  The fully featured API has more
1191  * complex  code that takes longer to execute, but makes much less use of
1192  * critical sections.  Therefore the alternative API sacrifices interrupt
1193  * responsiveness to gain execution speed, whereas the fully featured API
1194  * sacrifices execution speed to ensure better interrupt responsiveness.
1195  */
1196 signed portBASE_TYPE xQueueAltGenericSend( xQueueHandle pxQueue, const void * const pvItemToQueue, portTickType xTicksToWait, portBASE_TYPE xCopyPosition );
1197 signed portBASE_TYPE xQueueAltGenericReceive( xQueueHandle pxQueue, void * const pvBuffer, portTickType xTicksToWait, portBASE_TYPE xJustPeeking );
1198 #define xQueueAltSendToFront( xQueue, pvItemToQueue, xTicksToWait ) xQueueAltGenericSend( ( xQueue ), ( pvItemToQueue ), ( xTicksToWait ), queueSEND_TO_FRONT )
1199 #define xQueueAltSendToBack( xQueue, pvItemToQueue, xTicksToWait ) xQueueAltGenericSend( ( xQueue ), ( pvItemToQueue ), ( xTicksToWait ), queueSEND_TO_BACK )
1200 #define xQueueAltReceive( xQueue, pvBuffer, xTicksToWait ) xQueueAltGenericReceive( ( xQueue ), ( pvBuffer ), ( xTicksToWait ), pdFALSE )
1201 #define xQueueAltPeek( xQueue, pvBuffer, xTicksToWait ) xQueueAltGenericReceive( ( xQueue ), ( pvBuffer ), ( xTicksToWait ), pdTRUE )
1202
1203 /*
1204  * The functions defined above are for passing data to and from tasks.  The
1205  * functions below are the equivalents for passing data to and from
1206  * co-routines.
1207  *
1208  * These functions are called from the co-routine macro implementation and
1209  * should not be called directly from application code.  Instead use the macro
1210  * wrappers defined within croutine.h.
1211  */
1212 signed portBASE_TYPE xQueueCRSendFromISR( xQueueHandle pxQueue, const void *pvItemToQueue, signed portBASE_TYPE xCoRoutinePreviouslyWoken );
1213 signed portBASE_TYPE xQueueCRReceiveFromISR( xQueueHandle pxQueue, void *pvBuffer, signed portBASE_TYPE *pxTaskWoken );
1214 signed portBASE_TYPE xQueueCRSend( xQueueHandle pxQueue, const void *pvItemToQueue, portTickType xTicksToWait );
1215 signed portBASE_TYPE xQueueCRReceive( xQueueHandle pxQueue, void *pvBuffer, portTickType xTicksToWait );
1216
1217 /*
1218  * For internal use only.  Use xSemaphoreCreateMutex() or
1219  * xSemaphoreCreateCounting() instead of calling these functions directly.
1220  */
1221 xQueueHandle xQueueCreateMutex( void );
1222 xQueueHandle xQueueCreateCountingSemaphore( unsigned portBASE_TYPE uxCountValue, unsigned portBASE_TYPE uxInitialCount );
1223
1224 /*
1225  * For internal use only.  Use xSemaphoreTakeMutexRecursive() or
1226  * xSemaphoreGiveMutexRecursive() instead of calling these functions directly.
1227  */
1228 portBASE_TYPE xQueueTakeMutexRecursive( xQueueHandle pxMutex, portTickType xBlockTime );
1229 portBASE_TYPE xQueueGiveMutexRecursive( xQueueHandle pxMutex );
1230
1231 /*
1232  * The registry is provided as a means for kernel aware debuggers to
1233  * locate queues, semaphores and mutexes.  Call vQueueAddToRegistry() add
1234  * a queue, semaphore or mutex handle to the registry if you want the handle
1235  * to be available to a kernel aware debugger.  If you are not using a kernel
1236  * aware debugger then this function can be ignored.
1237  *
1238  * configQUEUE_REGISTRY_SIZE defines the maximum number of handles the
1239  * registry can hold.  configQUEUE_REGISTRY_SIZE must be greater than 0
1240  * within FreeRTOSConfig.h for the registry to be available.  Its value
1241  * does not effect the number of queues, semaphores and mutexes that can be
1242  * created - just the number that the registry can hold.
1243  *
1244  * @param xQueue The handle of the queue being added to the registry.  This
1245  * is the handle returned by a call to xQueueCreate().  Semaphore and mutex
1246  * handles can also be passed in here.
1247  *
1248  * @param pcName The name to be associated with the handle.  This is the
1249  * name that the kernel aware debugger will display.
1250  */
1251 #if configQUEUE_REGISTRY_SIZE > 0U
1252     void vQueueAddToRegistry( xQueueHandle xQueue, signed char *pcName );
1253 #endif
1254
1255 /* Not a public API function, hence the 'Restricted' in the name. */
1256 void vQueueWaitForMessageRestricted( xQueueHandle pxQueue, portTickType xTicksToWait );
1257
1258
1259 #ifdef __cplusplus
1260 }
1261 #endif
1262
1263 #endif /* QUEUE_H */
1264