Return-Path: X-Original-To: apmail-activemq-commits-archive@www.apache.org Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DDEDC98DF for ; Sun, 8 Apr 2012 16:22:59 +0000 (UTC) Received: (qmail 92985 invoked by uid 500); 8 Apr 2012 16:22:59 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 92895 invoked by uid 500); 8 Apr 2012 16:22:59 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 92884 invoked by uid 99); 8 Apr 2012 16:22:59 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 08 Apr 2012 16:22:59 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 08 Apr 2012 16:22:56 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id E6368238890B for ; Sun, 8 Apr 2012 16:22:35 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@activemq.apache.org From: tabish@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120408162235.E6368238890B@eris.apache.org> 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(