Lines Matching defs:tail
87 dataQueue->tail = 0;
111 const UInt32 tail = dataQueue->tail;
115 if ( tail >= head )
118 if ( (tail + entrySize) <= dataQueue->queueSize )
120 entry = (IODataQueueEntry *)((UInt8 *)dataQueue->queue + tail);
125 // The tail can be out of bound when the size of the new entry
127 // The tail can range from 0 to dataQueue->queueSize inclusive.
129 dataQueue->tail += entrySize;
133 // Wrap around to the beginning, but do not allow the tail to catch
142 if ( ( dataQueue->queueSize - tail ) >= DATA_QUEUE_ENTRY_HEADER_SIZE )
144 ((IODataQueueEntry *)((UInt8 *)dataQueue->queue + tail))->size = dataSize;
148 dataQueue->tail = entrySize;
157 // Do not allow the tail to catch up to the head when the queue is full.
160 if ( (head - tail) > entrySize )
162 entry = (IODataQueueEntry *)((UInt8 *)dataQueue->queue + tail);
166 dataQueue->tail += entrySize;
176 if ( ( head == tail ) /* queue was empty prior to enqueue() */
177 || ( dataQueue->head == tail ) ) /* queue was emptied during enqueue() */