Browse Source

Make fInit volatile in JackMessageBuffer class.

tags/1.9.9.5
Stephane Letz 13 years ago
parent
commit
d7fceb12fb
2 changed files with 5 additions and 2 deletions
  1. +4
    -1
      common/JackMessageBuffer.cpp
  2. +1
    -1
      common/JackMessageBuffer.h

+ 4
- 1
common/JackMessageBuffer.cpp View File

@@ -171,8 +171,11 @@ int JackMessageBuffer::SetInitCallback(JackThreadInitCallback callback, void *ar
/*
The condition variable emulation code does not work reliably on Windows (lost signal).
So use a "hachish" way to signal/wait for the result.
So use a "hackish" way to signal/wait for the result.
Probaly better in the long term : use pthread-win32 (http://sourceware.org/pthreads-win32/)
// wake msg buffer thread
fGuard.Signal()
// wait for it to be done
fGuard.Wait();
*/



+ 1
- 1
common/JackMessageBuffer.h View File

@@ -57,7 +57,7 @@ class JackMessageBuffer : public JackRunnableInterface

private:

JackThreadInitCallback fInit;
volatile JackThreadInitCallback fInit;
void* fInitArg;
JackMessage fBuffers[MB_BUFFERS];
JackThread fThread;


Loading…
Cancel
Save