activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r816384 - in /activemq/activemq-cpp/trunk/activemq-cpp: src/main/decaf/internal/util/concurrent/windows/ src/main/decaf/util/ vs2005-build/
Date Thu, 17 Sep 2009 21:13:17 GMT
Author: tabish
Date: Thu Sep 17 21:13:16 2009
New Revision: 816384

URL: http://svn.apache.org/viewvc?rev=816384&view=rev
Log:
Updates for building on Windows

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/concurrent/windows/ConditionHandle.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/concurrent/windows/ConditionImpl.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Map.h
    activemq/activemq-cpp/trunk/activemq-cpp/vs2005-build/vs2005-activemq.vcproj

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/concurrent/windows/ConditionHandle.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/concurrent/windows/ConditionHandle.h?rev=816384&r1=816383&r2=816384&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/concurrent/windows/ConditionHandle.h
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/concurrent/windows/ConditionHandle.h
Thu Sep 17 21:13:16 2009
@@ -35,7 +35,7 @@
 
         ~ConditionHandle() {
             CloseHandle( semaphore );
-            DestroyCriticalSection( &mutex );
+            ::DeleteCriticalSection( &criticalSection );
         }
 
         // The actual condition object

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/concurrent/windows/ConditionImpl.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/concurrent/windows/ConditionImpl.cpp?rev=816384&r1=816383&r2=816384&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/concurrent/windows/ConditionImpl.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/concurrent/windows/ConditionImpl.cpp
Thu Sep 17 21:13:16 2009
@@ -103,7 +103,7 @@
 
     do {
 
-        res = WaitForSingleObject( condition->semaphore, mills );
+        res = WaitForSingleObject( condition->semaphore, (DWORD)mills );
 
         EnterCriticalSection( &condition->criticalSection );
 
@@ -114,7 +114,7 @@
                 condition->numWaiting--;
                 break;
             } else {
-                wake = 1;
+                doWake = true;
             }
         }
         else if( res != WAIT_OBJECT_0 ) {
@@ -171,23 +171,23 @@
 ////////////////////////////////////////////////////////////////////////////////
 void ConditionImpl::notifyAll( ConditionHandle* condition ) {
 
-    unsigned int numWake = 0;
-
-    EnterCriticalSection( &condition->criticalSection );
+    try {
+        unsigned int numWake = 0;
 
-    if( condition->numWaiting > condition->numWake ) {
-        numWake = condition->numWaiting - condition->numWake;
-        condition->numWake = cond->numWaiting;
-        condition->generation++;
-    }
+        EnterCriticalSection( &condition->criticalSection );
 
-    LeaveCriticalSection( &condition->criticalSection );
+        if( condition->numWaiting > condition->numWake ) {
+            numWake = condition->numWaiting - condition->numWake;
+            condition->numWake = condition->numWaiting;
+            condition->generation++;
+        }
 
-    if( numWake ) {
-        ReleaseSemaphore( condition->semaphore, numWake, NULL );
-    }
+        LeaveCriticalSection( &condition->criticalSection );
 
-    if( pthread_cond_broadcast( &condition->condition ) ) {
+        if( numWake ) {
+            ReleaseSemaphore( condition->semaphore, numWake, NULL );
+        }
+    } catch(...) {
         throw RuntimeException(
             __FILE__, __LINE__, "Failed to broadcast signal OS Condition object." );
     }

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Map.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Map.h?rev=816384&r1=816383&r2=816384&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Map.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Map.h Thu Sep 17 21:13:16
2009
@@ -18,6 +18,7 @@
 #ifndef _DECAF_UTIL_MAP_H_
 #define _DECAF_UTIL_MAP_H_
 
+#include <functional>
 #include <vector>
 #include <decaf/lang/exceptions/UnsupportedOperationException.h>
 #include <decaf/lang/exceptions/NoSuchElementException.h>

Modified: activemq/activemq-cpp/trunk/activemq-cpp/vs2005-build/vs2005-activemq.vcproj
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/vs2005-build/vs2005-activemq.vcproj?rev=816384&r1=816383&r2=816384&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/vs2005-build/vs2005-activemq.vcproj (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/vs2005-build/vs2005-activemq.vcproj Thu Sep 17
21:13:16 2009
@@ -22611,6 +22611,14 @@
 						Name="concurrent"
 						>
 						<File
+							RelativePath="..\src\main\decaf\internal\util\concurrent\ConditionImpl.h"
+							>
+						</File>
+						<File
+							RelativePath="..\src\main\decaf\internal\util\concurrent\MutexImpl.h"
+							>
+						</File>
+						<File
 							RelativePath="..\src\main\decaf\internal\util\concurrent\SynchronizableImpl.cpp"
 							>
 						</File>
@@ -22618,6 +22626,26 @@
 							RelativePath="..\src\main\decaf\internal\util\concurrent\SynchronizableImpl.h"
 							>
 						</File>
+						<Filter
+							Name="windows"
+							>
+							<File
+								RelativePath="..\src\main\decaf\internal\util\concurrent\windows\ConditionHandle.h"
+								>
+							</File>
+							<File
+								RelativePath="..\src\main\decaf\internal\util\concurrent\windows\ConditionImpl.cpp"
+								>
+							</File>
+							<File
+								RelativePath="..\src\main\decaf\internal\util\concurrent\windows\MutexHandle.h"
+								>
+							</File>
+							<File
+								RelativePath="..\src\main\decaf\internal\util\concurrent\windows\MutexImpl.cpp"
+								>
+							</File>
+						</Filter>
 					</Filter>
 				</Filter>
 				<Filter
@@ -22659,6 +22687,10 @@
 						Name="windows"
 						>
 						<File
+							RelativePath="..\src\main\decaf\internal\lang\windows\ThreadHandle.h"
+							>
+						</File>
+						<File
 							RelativePath="..\src\main\decaf\internal\lang\windows\ThreadImpl.cpp"
 							>
 						</File>



Mime
View raw message