Author: tabish
Date: Mon Sep 14 20:45:44 2009
New Revision: 814839
URL: http://svn.apache.org/viewvc?rev=814839&view=rev
Log:
Updates for latest code changes so that windows binaries compile and tests pass.
Modified:
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/lang/windows/ThreadImpl.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/Thread.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/Mutex.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/Mutex.h
activemq/activemq-cpp/trunk/activemq-cpp/vs2005-build/vs2005-activemq-unittests.vcproj
activemq/activemq-cpp/trunk/activemq-cpp/vs2005-build/vs2005-activemq.vcproj
Modified:
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/lang/windows/ThreadImpl.cpp
URL:
http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/lang/windows/ThreadImpl.cpp?rev=814839&r1=814838&r2=814839&view=diff
==============================================================================
---
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/lang/windows/ThreadImpl.cpp
(original)
+++
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/lang/windows/ThreadImpl.cpp
Mon Sep 14 20:45:44 2009
@@ -23,7 +23,7 @@
#include <decaf/lang/exceptions/RuntimeException.h>
#include <decaf/util/concurrent/TimeUnit.h>
-#if HAVE_PROCESS_H
+#ifdef HAVE_PROCESS_H
#include <process.h>
#endif
@@ -73,7 +73,7 @@
handle->entryFunctionPtr( handle, handle->userArg );
handle->running = false;
#ifndef _WIN32_WCE
- _ endthreadex( 0 );
+ _endthreadex( 0 );
#else
ExitThread( 0 );
#endif
@@ -114,7 +114,7 @@
#endif
- if( result != 0 ) {
+ if( handle->handle == 0 ) {
throw RuntimeException(
__FILE__, __LINE__, "Failed to create new Thread." );
}
@@ -138,7 +138,7 @@
////////////////////////////////////////////////////////////////////////////////
void ThreadImpl::sleep( long long mills, long long nanos ) {
- ::Sleep( mills );
+ ::Sleep( (DWORD)mills );
}
////////////////////////////////////////////////////////////////////////////////
@@ -150,7 +150,7 @@
////////////////////////////////////////////////////////////////////////////////
void ThreadImpl::join( decaf::lang::ThreadHandle* handle, long long mills,
long long nanos ) {
- unsigned int rv = WaitForSingleObject( handle->handle, mills );
+ unsigned int rv = WaitForSingleObject( handle->handle, (DWORD)mills );
::CloseHandle( handle->handle );
}
Modified:
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/Thread.cpp
URL:
http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/Thread.cpp?rev=814839&r1=814838&r2=814839&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/Thread.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/Thread.cpp Mon
Sep 14 20:45:44 2009
@@ -269,8 +269,8 @@
////////////////////////////////////////////////////////////////////////////////
void Thread::sleep( long long millisecs )
- throw( lang::exceptions::InterruptedException,
- lang::exceptions::IllegalArgumentException ) {
+ throw( decaf::lang::exceptions::InterruptedException,
+ decaf::lang::exceptions::IllegalArgumentException ) {
if( millisecs < 0 ) {
throw IllegalArgumentException(
@@ -283,8 +283,8 @@
////////////////////////////////////////////////////////////////////////////////
void Thread::sleep( long long millisecs, unsigned int nanos )
- throw( lang::exceptions::InterruptedException,
- lang::exceptions::IllegalArgumentException ) {
+ throw( decaf::lang::exceptions::InterruptedException,
+ decaf::lang::exceptions::IllegalArgumentException ) {
if( millisecs < 0 ) {
throw IllegalArgumentException(
Modified:
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/Mutex.cpp
URL:
http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/Mutex.cpp?rev=814839&r1=814838&r2=814839&view=diff
==============================================================================
---
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/Mutex.cpp
(original)
+++
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/Mutex.cpp
Mon Sep 14 20:45:44 2009
@@ -44,7 +44,7 @@
////////////////////////////////////////////////////////////////////////////////
void Mutex::lock() throw( lang::Exception ) {
- unsigned long threadId = lang::Thread::getId();
+ long long threadId = lang::Thread::getId();
if( threadId == lock_owner ) {
lock_count++;
@@ -94,8 +94,8 @@
// Save the current owner as we are going to unlock and release for
// someone else to lock on potentially. When we come back and
// re-lock we want to restore to the state we were in before.
- unsigned long lock_owner = this->lock_owner;
- unsigned long lock_count = this->lock_count;
+ long long lock_owner = this->lock_owner;
+ long long lock_count = this->lock_count;
this->lock_owner = 0;
this->lock_count = 0;
Modified:
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/Mutex.h
URL:
http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/Mutex.h?rev=814839&r1=814838&r2=814839&view=diff
==============================================================================
---
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/Mutex.h
(original)
+++
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/Mutex.h
Mon Sep 14 20:45:44 2009
@@ -54,7 +54,7 @@
// Lock Status Members
volatile long long lock_owner;
- volatile unsigned long lock_count;
+ volatile long long lock_count;
private:
Modified:
activemq/activemq-cpp/trunk/activemq-cpp/vs2005-build/vs2005-activemq-unittests.vcproj
URL:
http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/vs2005-build/vs2005-activemq-unittests.vcproj?rev=814839&r1=814838&r2=814839&view=diff
==============================================================================
---
activemq/activemq-cpp/trunk/activemq-cpp/vs2005-build/vs2005-activemq-unittests.vcproj
(original)
+++
activemq/activemq-cpp/trunk/activemq-cpp/vs2005-build/vs2005-activemq-unittests.vcproj
Mon Sep 14 20:45:44 2009
@@ -11023,6 +11023,14 @@
>
</File>
<File
+
RelativePath="..\src\test\decaf\util\PriorityQueueTest.cpp"
+ >
+ </File>
+ <File
+
RelativePath="..\src\test\decaf\util\PriorityQueueTest.h"
+ >
+ </File>
+ <File
RelativePath="..\src\test\decaf\util\PropertiesTest.cpp"
>
</File>
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=814839&r1=814838&r2=814839&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
Mon Sep 14 20:45:44 2009
@@ -22648,6 +22648,22 @@
>
</File>
</Filter>
+ <Filter
+ Name="lang"
+ >
+ <File
+
RelativePath="..\src\main\decaf\internal\lang\ThreadImpl.h"
+ >
+ </File>
+ <Filter
+ Name="windows"
+ >
+ <File
+
RelativePath="..\src\main\decaf\internal\lang\windows\ThreadImpl.cpp"
+ >
+ </File>
+ </Filter>
+ </Filter>
</Filter>
<Filter
Name="lang"