Lines Matching refs:head
46 if ((ring->tail >= ring->head) && !ring->full) { in fwk_ring_get_length()
47 return (ring->tail - ring->head); in fwk_ring_get_length()
49 return ((ring->capacity - ring->head) + ring->tail); in fwk_ring_get_length()
71 return ((ring->head == ring->tail) && !ring->full); in fwk_ring_is_empty()
83 ring->head = fwk_ring_offset(ring, ring->head + buffer_size); in fwk_ring_pop()
104 if (fwk_ring_offset(ring, ring->head + buffer_size) > ring->head) { in fwk_ring_peek()
105 (void)memcpy(buffer, ring->storage + ring->head, buffer_size); in fwk_ring_peek()
107 size_t chunk_size = ring->capacity - ring->head; in fwk_ring_peek()
109 (void)memcpy(buffer, ring->storage + ring->head, chunk_size); in fwk_ring_peek()
156 ring->head = ring->tail; in fwk_ring_push()
173 ring->head = 0; in fwk_ring_clear()