From d5c1d66c2f386bedf7fae7dde348f46352109ac0 Mon Sep 17 00:00:00 2001 From: Russell Hancox Date: Mon, 18 May 2015 16:39:27 -0400 Subject: [PATCH] KernelTests: Update tests for dataqueue usage changes --- Tests/KernelTests/main.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tests/KernelTests/main.m b/Tests/KernelTests/main.m index ed2bf2649..c3e6d95c5 100644 --- a/Tests/KernelTests/main.m +++ b/Tests/KernelTests/main.m @@ -193,7 +193,7 @@ - (void)beginListening { /// Begin listening for events queueMemory = (IODataQueueMemory *)address; - while (IODataQueueWaitForAvailableData(queueMemory, receivePort) == kIOReturnSuccess) { + do { while (IODataQueueDataAvailable(queueMemory)) { dataSize = sizeof(vdata); kr = IODataQueueDequeue(queueMemory, &vdata, &dataSize); @@ -227,7 +227,7 @@ - (void)beginListening { TFAILINFO("Error receiving data: %d", kr); } } - } + } while (IODataQueueWaitForAvailableData(queueMemory, receivePort) == kIOReturnSuccess); IOConnectUnmapMemory(self.connection, kIODefaultMemoryType, mach_task_self(), address); mach_port_destroy(mach_task_self(), receivePort);