diff options
author | 2009-06-18 16:58:42 -0700 | |
---|---|---|
committer | 2009-06-18 16:58:42 -0700 | |
commit | 5f7fc27dce3f0ea0ce7532ee8ecd8a2cd01ec47b (patch) | |
tree | a9ca11ef8d57afb2c4055f54513444ae7c3f6d76 /libs/rs/rsThreadIO.cpp | |
parent | f8cd5d99888b7685d0304828a7fa549ddc0632c3 (diff) |
Replace spins with proper pthread conditions.
Diffstat (limited to 'libs/rs/rsThreadIO.cpp')
-rw-r--r-- | libs/rs/rsThreadIO.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libs/rs/rsThreadIO.cpp b/libs/rs/rsThreadIO.cpp index 23c808a6d4d0..56415819adbb 100644 --- a/libs/rs/rsThreadIO.cpp +++ b/libs/rs/rsThreadIO.cpp @@ -34,16 +34,17 @@ ThreadIO::~ThreadIO() { } -bool ThreadIO::playCoreCommands(Context *con) +bool ThreadIO::playCoreCommands(Context *con, bool waitForCommand) { //LOGE("playCoreCommands 1"); uint32_t cmdID = 0; uint32_t cmdSize = 0; bool ret = false; - while(!mToCore.isEmpty()) { + while(!mToCore.isEmpty() || waitForCommand) { ret = true; //LOGE("playCoreCommands 2"); const void * data = mToCore.get(&cmdID, &cmdSize); + waitForCommand = false; //LOGE("playCoreCommands 3 %i %i", cmdID, cmdSize); gPlaybackFuncs[cmdID](con, data); |