activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1311035 - /activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/concurrent/windows/PlatformThread.cpp
Date Sun, 08 Apr 2012 16:22:35 GMT
Author: tabish
Date: Sun Apr  8 16:22:35 2012
New Revision: 1311035

URL: http://svn.apache.org/viewvc?rev=1311035&view=rev
Log:
Fixes for builds on Windows

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/concurrent/windows/PlatformThread.cpp

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/concurrent/windows/PlatformThread.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/concurrent/windows/PlatformThread.cpp?rev=1311035&r1=1311034&r2=1311035&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/concurrent/windows/PlatformThread.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/concurrent/windows/PlatformThread.cpp
Sun Apr  8 16:22:35 2012
@@ -109,7 +109,7 @@ void PlatformThread::readerLockMutex(dec
 ////////////////////////////////////////////////////////////////////////////////
 void PlatformThread::writerLockMutex(decaf_rwmutex_t mutex) {
 
-    DWORD code = ::WaitForSingleObject(mutex->writMmutex, INFINITE);
+    DWORD code = ::WaitForSingleObject(mutex->writeMutex, INFINITE);
 
     if (code == WAIT_FAILED || code == WAIT_TIMEOUT) {
         throw RuntimeException(
@@ -164,7 +164,7 @@ bool PlatformThread::tryReaderLockMutex(
 ////////////////////////////////////////////////////////////////////////////////
 bool PlatformThread::tryWriterLockMutex(decaf_rwmutex_t mutex) {
 
-    DWORD code = ::WaitForSingleObject(mutex->writMmutex, 0);
+    DWORD code = ::WaitForSingleObject(mutex->writeMutex, 0);
 
     if (code == WAIT_FAILED) {
         throw RuntimeException(
@@ -193,7 +193,7 @@ void PlatformThread::unlockRWMutex(decaf
 
     DWORD result = 0;
 
-    if (! ::ReleaseMutex(rwlock->writeMutex)) {
+    if (! ::ReleaseMutex(mutex->writeMutex)) {
         result = ::GetLastError();
     }
 
@@ -202,7 +202,7 @@ void PlatformThread::unlockRWMutex(decaf
 
         // If there are readers and this is the last release, signal the event
         // so that any waiting writers get nofitied.
-        if (mutex->readers > 0 && ::InterlockedDecrement(mutex->readers)
== 0) {
+        if (mutex->readers > 0 && ::InterlockedDecrement(&mutex->readers)
== 0) {
 
            if (! ::SetEvent(mutex->readEvent)) {
                throw RuntimeException(



Mime
View raw message