Lines Matching defs:tail
95 dataQueue->tail = 0;
119 const UInt32 tail = dataQueue->tail;
123 if ( tail >= head )
126 if ( (tail + entrySize) <= dataQueue->queueSize )
128 entry = (IODataQueueEntry *)((UInt8 *)dataQueue->queue + tail);
133 // The tail can be out of bound when the size of the new entry
135 // The tail can range from 0 to dataQueue->queueSize inclusive.
137 dataQueue->tail += entrySize;
141 // Wrap around to the beginning, but do not allow the tail to catch
150 if ( ( dataQueue->queueSize - tail ) >= DATA_QUEUE_ENTRY_HEADER_SIZE )
152 ((IODataQueueEntry *)((UInt8 *)dataQueue->queue + tail))->size = dataSize;
156 dataQueue->tail = entrySize;
165 // Do not allow the tail to catch up to the head when the queue is full.
168 if ( (head - tail) > entrySize )
170 entry = (IODataQueueEntry *)((UInt8 *)dataQueue->queue + tail);
174 dataQueue->tail += entrySize;
184 if ( ( head == tail ) /* queue was empty prior to enqueue() */
185 || ( dataQueue->head == tail ) ) /* queue was emptied during enqueue() */