Lines Matching refs:dataQueue
44 IOSharedDataQueue *dataQueue = new IOSharedDataQueue;
46 if (dataQueue) {
47 if (!dataQueue->initWithCapacity(size)) {
48 dataQueue->release();
49 dataQueue = 0;
53 return dataQueue;
58 IOSharedDataQueue *dataQueue = new IOSharedDataQueue;
60 if (dataQueue) {
61 if (!dataQueue->initWithEntries(numEntries, entrySize)) {
62 dataQueue->release();
63 dataQueue = 0;
67 return dataQueue;
78 dataQueue = (IODataQueueMemory *)IOMallocAligned(round_page_32(size + DATA_QUEUE_MEMORY_HEADER_SIZE + DATA_QUEUE_MEMORY_APPENDIX_SIZE), PAGE_SIZE);
79 if (dataQueue == 0) {
83 dataQueue->queueSize = size;
84 dataQueue->head = 0;
85 dataQueue->tail = 0;
87 appendix = (IODataQueueAppendix *)((UInt8 *)dataQueue + size + DATA_QUEUE_MEMORY_HEADER_SIZE);
97 if (dataQueue) {
98 IOFreeAligned(dataQueue, round_page_32(dataQueue->queueSize + DATA_QUEUE_MEMORY_HEADER_SIZE + DATA_QUEUE_MEMORY_APPENDIX_SIZE));
99 dataQueue = NULL;
109 if (dataQueue != 0) {
110 descriptor = IOMemoryDescriptor::withAddress(dataQueue, dataQueue->queueSize + DATA_QUEUE_MEMORY_HEADER_SIZE + DATA_QUEUE_MEMORY_APPENDIX_SIZE, kIODirectionOutIn);
121 if (dataQueue && (dataQueue->head != dataQueue->tail)) {
124 UInt32 headOffset = dataQueue->head;
125 UInt32 queueSize = dataQueue->queueSize;
127 head = (IODataQueueEntry *)((char *)dataQueue->queue + headOffset);
138 entry = dataQueue->queue;
154 if (dataQueue) {
155 if (dataQueue->head != dataQueue->tail) {
158 UInt32 headOffset = dataQueue->head;
159 UInt32 queueSize = dataQueue->queueSize;
161 head = (IODataQueueEntry *)((char *)dataQueue->queue + headOffset);
169 entry = dataQueue->queue;
185 dataQueue->head = newHeadOffset;
193 dataQueue->head = newHeadOffset;