diff options
author | Jon Medhurst <tixy@linaro.org> | 2013-04-03 11:59:40 +0100 |
---|---|---|
committer | Jon Medhurst <tixy@linaro.org> | 2013-04-03 12:54:15 +0100 |
commit | 7ef1b3596e3625d6335fd03904dfdcc75f365919 (patch) | |
tree | 4b309e83ab767e561a2235668b3ad6cd830bb40c /daemon/Fifo.h | |
parent | 06ebd1eab0a782377611efee820bb57f09692cbf (diff) |
gator: Version 5.14DS-5.14
Signed-off-by: Jon Medhurst <tixy@linaro.org>
Diffstat (limited to 'daemon/Fifo.h')
-rw-r--r-- | daemon/Fifo.h | 8 |
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; }; |