Lines Matching refs:queue

6 A :dfn:`message queue` is a kernel object that implements a simple
7 message queue, allowing threads and ISRs to asynchronously send and receive
18 Each message queue is referenced by its memory address.
20 A message queue has the following key properties:
28 A message queue must be initialized before it can be used.
31 A data item can be **sent** to a message queue by a thread or an ISR.
33 if one exists; otherwise the item is copied to the message queue's ring buffer,
35 *must* equal the message queue's data item size.
43 A data item can be **received** from a message queue by a thread.
45 the size of the receiving area *must* equal the message queue's data item size.
53 A thread can also **peek** at the message on the head of a message queue without
54 removing it from the queue.
56 the size of the receiving area *must* equal the message queue's data item size.
59 The kernel does allow an ISR to receive an item from a message queue,
60 however the ISR must not attempt to wait if the message queue is empty.
63 Alignment of the message queue's ring buffer is not necessary.
73 A message queue is defined using a variable of type :c:struct:`k_msgq`.
76 The following code defines and initializes an empty message queue
92 Alternatively, a message queue can be defined and initialized at compile time
96 that the macro defines both the message queue and its buffer.
105 A data item is added to a message queue by calling :c:func:`k_msgq_put`.
107 The following code builds on the example above, and uses the message queue
109 If the message queue fills up because the consumers can't keep up, the
125 /* message queue is full: purge old data & try again */
129 /* data item was successfully added to message queue */
136 A data item is taken from a message queue by calling :c:func:`k_msgq_get`.
138 The following code builds on the example above, and uses the message queue
162 A data item is read from a message queue by calling :c:func:`k_msgq_peek`.
164 The following code peeks into the message queue to read the data item at the
165 head of the queue that is generated by one or more producing threads.
174 /* read a data item by peeking into the queue */
185 Use a message queue to transfer small data items between threads
189 A message queue can be used to transfer large data items, if desired.