From c3bc71d6e23aef3299cc021cc53b271d3e885b4c Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Thu, 17 Dec 2009 11:06:16 +0000 Subject: [PATCH] Removed superfluous ConditionVariableEntry::WaitStatus() checks. Wait() always returns the correct value. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34686 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/port.cpp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/system/kernel/port.cpp b/src/system/kernel/port.cpp index 87633200ac..d3fe1ea13c 100644 --- a/src/system/kernel/port.cpp +++ b/src/system/kernel/port.cpp @@ -1070,8 +1070,6 @@ _get_port_message_info_etc(port_id id, port_message_info* info, // block if no message, or, if B_TIMEOUT flag set, block with timeout status_t status = entry.Wait(flags, timeout); - if (status == B_OK && entry.WaitStatus() != B_OK) - status = entry.WaitStatus(); if (status != B_OK) { T(Info(sPorts[slot], 0, status)); @@ -1183,11 +1181,10 @@ read_port_etc(port_id id, int32* _code, void* buffer, size_t bufferSize, return B_BAD_PORT_ID; } - if (status != B_OK || entry.WaitStatus() != B_OK) { - T(Read(sPorts[slot], 0, - status != B_OK ? status : entry.WaitStatus())); + if (status != B_OK) { + T(Read(sPorts[slot], 0, status)); sPorts[slot].read_count++; - return status != B_OK ? status : entry.WaitStatus(); + return status; } } @@ -1307,11 +1304,8 @@ writev_port_etc(port_id id, int32 msgCode, const iovec* msgVecs, return B_BAD_PORT_ID; } - if (status != B_OK || entry.WaitStatus() != B_OK) { - if (status == B_OK) - status = entry.WaitStatus(); + if (status != B_OK) goto error; - } } else sPorts[slot].write_count--;