diff options
| author | 2012-02-07 16:40:51 -0800 | |
|---|---|---|
| committer | 2012-02-07 16:40:51 -0800 | |
| commit | eb5b73504d4e12c390985b573b61b4d9bcaa74dd (patch) | |
| tree | 5e89fc08fe442cbb66233203ab0ddd152ec6262d /libs/rs/rsThreadIO.h | |
| parent | f835ca02713e34b0939957389a21022a9a6ce5c9 (diff) | |
| parent | bdeec118a120d2424ff80c54c2f218ed0d52d3e2 (diff) | |
Merge commit 'bdeec118' into manualmerge
Conflicts:
libs/rs/rsThreadIO.h
Change-Id: I7f448996a86f41188b47ec3dc353c364692e8bf2
Diffstat (limited to 'libs/rs/rsThreadIO.h')
| -rw-r--r-- | libs/rs/rsThreadIO.h | 35 |
1 files changed, 9 insertions, 26 deletions
diff --git a/libs/rs/rsThreadIO.h b/libs/rs/rsThreadIO.h index 7e730df31271..d56a1c99a1e1 100644 --- a/libs/rs/rsThreadIO.h +++ b/libs/rs/rsThreadIO.h @@ -18,7 +18,6 @@ #define ANDROID_RS_THREAD_IO_H #include "rsUtils.h" -#include "rsLocklessFifo.h" #include "rsFifoSocket.h" // --------------------------------------------------------------------------- @@ -32,29 +31,17 @@ public: ThreadIO(); ~ThreadIO(); - void init(bool useSocket = false); + void init(); void shutdown(); // Plays back commands from the client. // Returns true if any commands were processed. - // - // waitForCommand: true, block until a command arrives or - // the specified time expires. - // - // timeToWait: Max time to block in microseconds. A value of zero indicates - // an indefinite wait. - bool playCoreCommands(Context *con, bool waitForCommand, uint64_t timeToWait); + bool playCoreCommands(Context *con, bool waitForCommand, int waitFd); - void setTimoutCallback(void (*)(void *), void *, uint64_t timeout); - //LocklessCommandFifo mToCore; + void setTimeoutCallback(void (*)(void *), void *, uint64_t timeout); - - - void coreFlush(); void * coreHeader(uint32_t, size_t dataLen); - void coreData(const void *data, size_t dataLen); void coreCommit(); - void coreCommitSync(); void coreSetReturn(const void *data, size_t dataLen); void coreGetReturn(void *data, size_t dataLen); @@ -77,20 +64,16 @@ protected: } ClientCmdHeader; ClientCmdHeader mLastClientHeader; - size_t mCoreCommandSize; - uint32_t mCoreCommandID; - uint8_t * mCoreDataPtr; - uint8_t * mCoreDataBasePtr; + bool mRunning; - bool mUsingSocket; - LocklessCommandFifo mToClient; - LocklessCommandFifo mToCore; - - FifoSocket mToClientSocket; - FifoSocket mToCoreSocket; + FifoSocket mToClient; + FifoSocket mToCore; intptr_t mToCoreRet; + size_t mSendLen; + uint8_t mSendBuffer[2 * 1024]; + }; |