aboutsummaryrefslogtreecommitdiff
path: root/daemon/Fifo.cpp
diff options
context:
space:
mode:
authorDrew Richardson <drew.richardson@arm.com>2012-07-31 12:00:00 -0700
committerDrew Richardson <drew.richardson@arm.com>2014-12-19 15:29:29 -0800
commit5f9955b9c65967a7a62f7860295d8ac187c9ec11 (patch)
treef5c3a2b6025bf9f3e436b8de9ae9f67131fe854d /daemon/Fifo.cpp
parent3abe11d177c6c93fab66d04fd42d11452a0c508e (diff)
gator: Version 5.115.11
Signed-off-by: Drew Richardson <drew.richardson@arm.com>
Diffstat (limited to 'daemon/Fifo.cpp')
-rw-r--r--daemon/Fifo.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/daemon/Fifo.cpp b/daemon/Fifo.cpp
index 3d53024..191536f 100644
--- a/daemon/Fifo.cpp
+++ b/daemon/Fifo.cpp
@@ -48,7 +48,7 @@ char* Fifo::start() {
}
bool Fifo::isEmpty() {
- return mRead == mWrite;
+ return mRead == mWrite && mRaggedEnd == 0;
}
bool Fifo::isFull() {
@@ -56,8 +56,7 @@ bool Fifo::isFull() {
}
// Determines if the buffer will fill assuming 'additional' bytes will be added to the buffer
-// comparisons use '<', read and write pointers must never equal when not empty
-// 'full' means there is less than singleBufferSize bytes available; it does not mean there are zero bytes available
+// 'full' means there is less than singleBufferSize bytes available contiguously; it does not mean there are zero bytes available
bool Fifo::willFill(int additional) {
if (mWrite > mRead) {
if (numBytesFilled() + additional < mWrapThreshold) {