Searched refs:entrySize (Results 1 - 4 of 4) sorted by relevance

/xnu-2422.115.4/iokit/Kernel/
H A DIOSharedDataQueue.cpp60 IOSharedDataQueue *IOSharedDataQueue::withEntries(UInt32 numEntries, UInt32 entrySize) argument
65 if (!dataQueue->initWithEntries(numEntries, entrySize)) {
187 const UInt32 entrySize = dataSize + DATA_QUEUE_ENTRY_HEADER_SIZE; local
190 // Check for overflow of entrySize
202 if ((entrySize <= UINT32_MAX - tail) &&
203 ((tail + entrySize) <= getQueueSize()) )
214 OSAddAtomic(entrySize, (SInt32 *)&dataQueue->tail);
216 else if ( head > entrySize ) // Is there enough room at the beginning?
233 OSCompareAndSwap(dataQueue->tail, entrySize, &dataQueue->tail);
245 if ( (head - tail) > entrySize )
274 UInt32 entrySize = 0; local
[all...]
H A DIODataQueue.cpp61 IODataQueue *IODataQueue::withEntries(UInt32 numEntries, UInt32 entrySize) argument
66 if (!dataQueue->initWithEntries(numEntries, entrySize)) {
105 Boolean IODataQueue::initWithEntries(UInt32 numEntries, UInt32 entrySize) argument
107 // Checking overflow for (numEntries + 1)*(entrySize + DATA_QUEUE_ENTRY_HEADER_SIZE):
108 // check (entrySize + DATA_QUEUE_ENTRY_HEADER_SIZE)
109 if ((entrySize > UINT32_MAX - DATA_QUEUE_ENTRY_HEADER_SIZE) ||
112 // check (numEntries + 1)*(entrySize + DATA_QUEUE_ENTRY_HEADER_SIZE)
113 (entrySize + DATA_QUEUE_ENTRY_HEADER_SIZE > UINT32_MAX/(numEntries+1))) {
117 return (initWithCapacity((numEntries + 1) * (DATA_QUEUE_ENTRY_HEADER_SIZE + entrySize)));
135 const UInt32 entrySize local
[all...]
/xnu-2422.115.4/iokit/IOKit/
H A DIODataQueue.h88 * @discussion This method will create a new IODataQueue instance with enough capacity for numEntries of entrySize. It does account for the IODataQueueEntry overhead for each entry. Note that the numEntries and entrySize are simply used to determine the data region size. They do not actually restrict the size of number of entries that can be added to the queue.<br> This method allocates a new IODataQueue instance and then calls initWithEntries() with the given numEntries and entrySize parameters. If the initWithEntries() fails, the new instance is released and zero is returned.
90 * @param entrySize Size of each entry.
93 static IODataQueue *withEntries(UInt32 numEntries, UInt32 entrySize);
107 * @discussion This method will initialize an IODataQueue instance with enough capacity for numEntries of entrySize. It does account for the IODataQueueEntry overhead for each entry. Note that the numEntries and entrySize are simply used to determine the data region size. They do not actually restrict the size of number of entries that can be added to the queue.<br> This method allocates a new IODataQueue instance and then calls initWithEntries() with the given numEntries and entrySize parameters.
109 * @param entrySize Size of each entry.
112 virtual Boolean initWithEntries(UInt32 numEntries, UInt32 entrySize);
[all...]
H A DIOSharedDataQueue.h81 * @discussion This method will create a new IOSharedDataQueue instance with enough capacity for numEntries of entrySize. It does account for the IODataQueueEntry overhead for each entry. Note that the numEntries and entrySize are simply used to determine the data region size. They do not actually restrict the size of number of entries that can be added to the queue.<br> This method allocates a new IODataQueue instance and then calls initWithEntries() with the given numEntries and entrySize parameters. If the initWithEntries() fails, the new instance is released and zero is returned.
83 * @param entrySize Size of each entry.
86 static IOSharedDataQueue *withEntries(UInt32 numEntries, UInt32 entrySize);

Completed in 24 milliseconds