Lines Matching full:a
6 A :dfn:`message queue` is a kernel object that implements a simple
20 A message queue has the following key properties:
22 * A **ring buffer** of data items that have been sent but not yet received.
24 * A **data item size**, measured in bytes.
26 * A **maximum quantity** of data items that can be queued in the ring buffer.
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.
32 The data item pointed at by the sending thread is copied to a waiting thread,
37 If a thread attempts to send a data item when the ring buffer is full,
43 A data item can be **received** from a message queue by a thread.
47 If a thread attempts to receive a data item when the ring buffer is empty,
48 the receiving thread may choose to wait for a data item to be sent.
50 is empty; when a data item becomes available it is given to
53 A thread can also **peek** at the message on the head of a message queue without
59 The kernel does allow an ISR to receive an item from a message queue,
70 Defining a Message Queue
73 A message queue is defined using a variable of type :c:struct:`k_msgq`.
92 Alternatively, a message queue can be defined and initialized at compile time
102 Writing to a Message Queue
105 A data item is added to a message queue by calling :c:func:`k_msgq_put`.
108 to pass data items from a producing thread to one or more consuming threads.
133 Reading from a Message Queue
136 A data item is taken from a message queue by calling :c:func:`k_msgq_get`.
150 /* get a data item */
159 Peeking into a Message Queue
162 A data item is read from a message queue by calling :c:func:`k_msgq_peek`.
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.
191 while a data item is written or read. The time to write or read a data item
194 to transfer large data items by exchanging a pointer to the data item,
197 A synchronous transfer can be achieved by using the kernel's mailbox