Lines Matching +refs:fill +refs:buffer
358 deUint32 buffer[32]; member
360 deSemaphore fill; member
368 TestBuffer* buffer = (TestBuffer*)arg; in producerThread() local
390 deSemaphore_decrement(buffer->empty); in producerThread()
392 buffer->buffer[writePos] = val; in producerThread()
393 writePos = (writePos + 1) % DE_LENGTH_OF_ARRAY(buffer->buffer); in producerThread()
395 deSemaphore_increment(buffer->fill); in producerThread()
397 buffer->producerHash ^= val; in producerThread()
403 TestBuffer* buffer = (TestBuffer*)arg; in consumerThread() local
410 deSemaphore_decrement(buffer->fill); in consumerThread()
412 val = buffer->buffer[readPos]; in consumerThread()
413 readPos = (readPos + 1) % DE_LENGTH_OF_ARRAY(buffer->buffer); in consumerThread()
415 deSemaphore_increment(buffer->empty); in consumerThread()
417 buffer->consumerHash ^= val; in consumerThread()
447 testBuffer.empty = deSemaphore_create(DE_LENGTH_OF_ARRAY(testBuffer.buffer), DE_NULL); in deSemaphore_selfTest()
448 testBuffer.fill = deSemaphore_create(0, DE_NULL); in deSemaphore_selfTest()
450 DE_TEST_ASSERT(testBuffer.empty && testBuffer.fill); in deSemaphore_selfTest()
465 deSemaphore_destroy(testBuffer.fill); in deSemaphore_selfTest()