Lines Matching full:first
8 * Memory FIFO permitting enqueue at tail (last) and dequeue from head (first).
54 uint8_t f; /* First. Read index */ \
60 * @details API 1 and 2. An MFIFO is empty if first == last
80 static inline bool mfifo_enqueue_idx_get(uint8_t count, uint8_t first, in mfifo_enqueue_idx_get() argument
91 * first == last, but we just advanced a copy of the write-index before in mfifo_enqueue_idx_get()
92 * and may have wrapped. So if first == last the queue is full and we in mfifo_enqueue_idx_get()
95 if (last == first) { in mfifo_enqueue_idx_get()
144 uint8_t count, uint8_t first, in mfifo_enqueue_get() argument
150 if (!mfifo_enqueue_idx_get(count, first, last, &idx)) { in mfifo_enqueue_get()
208 * Empty if first == last
210 static inline uint8_t mfifo_avail_count_get(uint8_t count, uint8_t first, in mfifo_avail_count_get() argument
213 if (last >= first) { in mfifo_avail_count_get()
214 return last - first; in mfifo_avail_count_get()
216 return count - first + last; in mfifo_avail_count_get()
233 uint8_t first, uint8_t last) in mfifo_dequeue_get() argument
235 if (first == last) { in mfifo_dequeue_get()
240 return (void *)(fifo + first * size); in mfifo_dequeue_get()
255 uint8_t first, uint8_t last) in mfifo_dequeue_peek() argument
257 if (first == last) { in mfifo_dequeue_peek()
262 return *((void **)(fifo + first * size)); in mfifo_dequeue_peek()
274 uint8_t count, uint8_t first, in mfifo_dequeue_iter_get() argument
281 *idx = first; in mfifo_dequeue_iter_get()
312 * @param first[in,out] Head index, Span: [0 .. count-1]. Will be updated
316 uint8_t last, uint8_t *first) in mfifo_dequeue() argument
318 uint8_t _first = *first; /* Copy read-index */ in mfifo_dequeue()
321 /* Queue is empty if first == last */ in mfifo_dequeue()
337 *first = _first; /* Write back read-index */ in mfifo_dequeue()