Lines Matching refs:head
41 (1) A 'head' index - the point at which the producer inserts items into the
47 Typically when the tail pointer is equal to the head pointer, the buffer is
48 empty; and the buffer is full when the head pointer is one less than the tail
51 The head index is incremented when items are added, and the tail index when
52 items are removed. The tail index should never jump the head index, and both
116 they will return a lower bound as the producer controls the head index,
126 head index.
162 unsigned long head = buffer->head;
166 if (CIRC_SPACE(head, tail, buffer->size) >= 1) {
168 struct item *item = buffer[head];
172 smp_store_release(buffer->head,
173 (head + 1) & (buffer->size - 1));
175 /* wake_up() will make sure that the head is committed before
183 before the head index makes it available to the consumer and then instructs the
184 CPU that the revised head index must be written before the consumer is woken.
204 unsigned long head = smp_load_acquire(buffer->head);
207 if (CIRC_CNT(head, tail, buffer->size) >= 1) {