Browse Source

Naming of synchro primitive on Windows.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4741 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/1.9.9.5
sletz 9 years ago
parent
commit
f5fd13a2ca
7 changed files with 24 additions and 13 deletions
  1. +1
    -1
      common/JackClient.h
  2. +7
    -3
      common/JackEngine.cpp
  3. +8
    -1
      common/JackMessageBuffer.cpp
  4. +1
    -1
      macosx/Jackdmp.xcodeproj/project.pbxproj
  5. +1
    -1
      posix/JackPosixProcessSync.h
  6. +2
    -2
      windows/JackWinMutex.h
  7. +4
    -4
      windows/JackWinProcessSync.h

+ 1
- 1
common/JackClient.h View File

@@ -87,7 +87,7 @@ class SERVER_EXPORT JackClient : public JackClientInterface, public JackRunnable
void* fThreadFunArg;
void* fSessionArg;
void* fLatencyArg;
char fServerName[64];
char fServerName[JACK_SERVER_CONTROL_NAME_SIZE];

JackThread fThread; /*! Thread to execute the Process function */
detail::JackClientChannelInterface* fChannel;


+ 7
- 3
common/JackEngine.cpp View File

@@ -38,13 +38,16 @@ namespace Jack

JackEngine::JackEngine(JackGraphManager* manager,
JackSynchro* table,
JackEngineControl* control)
JackEngineControl* control)
: fSignal(control->fServerName)
{
fGraphManager = manager;
fSynchroTable = table;
fEngineControl = control;
for (int i = 0; i < CLIENT_NUM; i++)
for (int i = 0; i < CLIENT_NUM; i++) {
fClientTable[i] = NULL;
}
fLastSwitchUsecs = 0;
fMaxUUID = 0;
fSessionPendingReplies = 0;
@@ -132,8 +135,9 @@ void JackEngine::ReleaseRefnum(int ref)
if (fEngineControl->fTemporary) {
int i;
for (i = fEngineControl->fDriverNum; i < CLIENT_NUM; i++) {
if (fClientTable[i])
if (fClientTable[i]) {
break;
}
}
if (i == CLIENT_NUM) {
// last client and temporay case: quit the server


+ 8
- 1
common/JackMessageBuffer.cpp View File

@@ -29,7 +29,14 @@ namespace Jack
JackMessageBuffer* JackMessageBuffer::fInstance = NULL;

JackMessageBuffer::JackMessageBuffer()
:fInit(NULL),fInitArg(NULL),fThread(this),fInBuffer(0),fOutBuffer(0),fOverruns(0),fRunning(false)
:fInit(NULL),
fInitArg(NULL),
fThread(this),
fGuard("JackMessageBuffer"),
fInBuffer(0),
fOutBuffer(0),
fOverruns(0),
fRunning(false)
{}

JackMessageBuffer::~JackMessageBuffer()


+ 1
- 1
macosx/Jackdmp.xcodeproj/project.pbxproj View File

@@ -3309,8 +3309,8 @@
4B1499EE14BDA5B300A51A3C /* JackGenericClientChannel.cpp */,
4B1499EF14BDA5B300A51A3C /* JackGenericClientChannel.h */,
4BF8D1AF0834EEC400C94B91 /* JackChannel.h */,
4BB371D40C1AD85A0050C1E4 /* JackNotification.h */,
4BF8D1B30834EED500C94B91 /* JackInternalClientChannel.h */,
4BB371D40C1AD85A0050C1E4 /* JackNotification.h */,
4BFB299908AF452300D450D4 /* Socket */,
);
name = Channels;


+ 1
- 1
posix/JackPosixProcessSync.h View File

@@ -41,7 +41,7 @@ class JackPosixProcessSync : public JackBasePosixMutex

public:

JackPosixProcessSync():JackBasePosixMutex()
JackPosixProcessSync(const char* name = NULL):JackBasePosixMutex()
{
int res = pthread_cond_init(&fCond, NULL);
ThrowIf(res != 0, JackException("JackBasePosixMutex: could not init the cond variable"));


+ 2
- 2
windows/JackWinMutex.h View File

@@ -44,7 +44,7 @@ class SERVER_EXPORT JackBaseWinMutex
JackBaseWinMutex():fOwner(0)
{
// In recursive mode by default
fMutex = (HANDLE)CreateMutex(0, FALSE, 0);
fMutex = CreateMutex(NULL, FALSE, NULL);
ThrowIf(fMutex == 0, JackException("JackWinMutex: could not init the mutex"));
}

@@ -71,7 +71,7 @@ class SERVER_EXPORT JackWinMutex
JackWinMutex()
{
// In recursive mode by default
fMutex = (HANDLE)CreateMutex(0, FALSE, 0);
fMutex = CreateMutex(NULL, FALSE, NULL);
}

virtual ~JackWinMutex()


+ 4
- 4
windows/JackWinProcessSync.h View File

@@ -39,12 +39,12 @@ class JackWinProcessSync : public JackWinMutex

public:

JackWinProcessSync():JackWinMutex()
JackWinProcessSync(const char* name = NULL):JackWinMutex()
{
//fEvent = (HANDLE)CreateEvent(NULL, FALSE, FALSE, NULL);
fEvent = (HANDLE)CreateEvent(NULL, TRUE, FALSE, NULL); // Needs ResetEvent
//fEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
fEvent = CreateEvent(NULL, TRUE, FALSE, (LPCTSTR)name); // Needs ResetEvent
}
~JackWinProcessSync()
virtual ~JackWinProcessSync()
{
CloseHandle(fEvent);
}


Loading…
Cancel
Save