aboutsummaryrefslogtreecommitdiff
path: root/daemon/Fifo.h
diff options
context:
space:
mode:
authorDrew Richardson <drew.richardson@arm.com>2013-03-26 12:00:00 -0700
committerDrew Richardson <drew.richardson@arm.com>2014-12-19 15:41:32 -0800
commit1b5637426bfc10a64571c81e24019032206d651b (patch)
tree71e362be9385179b545c77205cdab612a133ca86 /daemon/Fifo.h
parenta01058e248133bb7c1ba0238ab380e4fac924e97 (diff)
downloadgator-1b5637426bfc10a64571c81e24019032206d651b.tar.gz
gator: Version 5.145.14
Signed-off-by: Drew Richardson <drew.richardson@arm.com>
Diffstat (limited to 'daemon/Fifo.h')
-rw-r--r--daemon/Fifo.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/daemon/Fifo.h b/daemon/Fifo.h
index e2a5d94..d46e1af 100644
--- a/daemon/Fifo.h
+++ b/daemon/Fifo.h
@@ -1,5 +1,5 @@
/**
- * Copyright (C) ARM Limited 2010-2012. All rights reserved.
+ * Copyright (C) ARM Limited 2010-2013. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
@@ -13,7 +13,7 @@
class Fifo {
public:
- Fifo(int singleBufferSize, int totalBufferSize);
+ Fifo(int singleBufferSize, int totalBufferSize, sem_t* readerSem);
~Fifo();
int numBytesFilled() const;
bool isEmpty() const;
@@ -21,11 +21,13 @@ public:
bool willFill(int additional) const;
char* start() const;
char* write(int length);
+ void release();
char* read(int *const length);
private:
int mSingleBufferSize, mWrite, mRead, mReadCommit, mRaggedEnd, mWrapThreshold;
- sem_t mWaitForSpaceSem, mWaitForDataSem;
+ sem_t mWaitForSpaceSem;
+ sem_t* mReaderSem;
char* mBuffer;
bool mEnd;
};