From 730d9770bfd368304f6a8e4bb67d2d5cfeb7f1d3 Mon Sep 17 00:00:00 2001 From: abd Date: Wed, 20 Jun 2007 13:24:11 +0000 Subject: [PATCH] Corrected implementation of MESSAGE functionality on Windows Porting current version of BR_Dev_For_4_0 branch on Windows. First stable Windows version of BR_Dev_For_4_0 branch. --- src/Container/Component_i.cxx | 54 +++++++++++++++++++++++++++++++- src/Container/Container_i.cxx | 14 +++++++-- src/Registry/RegistryService.cxx | 6 ++++ src/SALOMELocalTrace/utilities.h | 2 +- 4 files changed, 72 insertions(+), 4 deletions(-) diff --git a/src/Container/Component_i.cxx b/src/Container/Component_i.cxx index 558275659..0efb11a82 100644 --- a/src/Container/Component_i.cxx +++ b/src/Container/Component_i.cxx @@ -45,6 +45,7 @@ #else #include int SIGUSR11 = 1000; +#include #endif @@ -209,8 +210,13 @@ CORBA::Long Engines_Component_i::getStudyId() void Engines_Component_i::ping() { +#ifndef WNT MESSAGE("Engines_Component_i::ping() pid "<< getpid() << " threadid " << pthread_self()); +#else + MESSAGE("Engines_Component_i::ping() pid "<< _getpid()<< " threadid " + << pthread_self().p ); +#endif } //============================================================================= @@ -358,11 +364,19 @@ bool Engines_Component_i::Kill_impl() bool Engines_Component_i::Stop_impl() { +#ifndef WNT MESSAGE("Engines_Component_i::Stop_i() pthread_t "<< pthread_self() << " pid " << getpid() << " instanceName " << _instanceName.c_str() << " interface " << _interfaceName.c_str() << " machineName " << GetHostname().c_str()<< " _id " << hex << _id << dec << " _ThreadId " << _ThreadId ); +#else + MESSAGE("Engines_Component_i::Stop_i() pthread_t "<< pthread_self().p + << " pid " << _getpid() << " instanceName " + << _instanceName.c_str() << " interface " << _interfaceName.c_str() + << " machineName " << GetHostname().c_str()<< " _id " << hex << _id + << dec << " _ThreadId " << _ThreadId ); +#endif bool RetVal = false ; @@ -390,11 +404,19 @@ bool Engines_Component_i::Stop_impl() bool Engines_Component_i::Suspend_impl() { +#ifndef WNT MESSAGE("Engines_Component_i::Suspend_i() pthread_t "<< pthread_self() << " pid " << getpid() << " instanceName " << _instanceName.c_str() << " interface " << _interfaceName.c_str() << " machineName " << GetHostname().c_str()<< " _id " << hex << _id << dec << " _ThreadId " << _ThreadId ); +#else + MESSAGE("Engines_Component_i::Suspend_i() pthread_t "<< pthread_self().p + << " pid " << _getpid() << " instanceName " + << _instanceName.c_str() << " interface " << _interfaceName.c_str() + << " machineName " << GetHostname().c_str()<< " _id " << hex << _id + << dec << " _ThreadId " << _ThreadId ); +#endif bool RetVal = false ; #ifndef WNT @@ -429,11 +451,19 @@ bool Engines_Component_i::Suspend_impl() bool Engines_Component_i::Resume_impl() { +#ifndef WNT MESSAGE("Engines_Component_i::Resume_i() pthread_t "<< pthread_self() << " pid " << getpid() << " instanceName " << _instanceName.c_str() << " interface " << _interfaceName.c_str() << " machineName " << GetHostname().c_str()<< " _id " << hex << _id << dec << " _ThreadId " << _ThreadId ); +#else + MESSAGE("Engines_Component_i::Resume_i() pthread_t "<< pthread_self().p + << " pid " << _getpid() << " instanceName " + << _instanceName.c_str() << " interface " << _interfaceName.c_str() + << " machineName " << GetHostname().c_str()<< " _id " << hex << _id + << dec << " _ThreadId " << _ThreadId ); +#endif bool RetVal = false ; #ifndef WNT if ( _ThreadId > 0 && pthread_self() != _ThreadId ) @@ -569,8 +599,13 @@ PortableServer::ObjectId * Engines_Component_i::getId() void Engines_Component_i::beginService(const char *serviceName) { +#ifndef WNT MESSAGE(pthread_self() << "Send BeginService notification for " < +#else +#include #endif using namespace std; @@ -257,5 +259,9 @@ void RegistryService::SessionName( const char *sessionName ) } void RegistryService::ping() { +#ifndef WNT MESSAGE(" RegistryService::ping() pid "<< getpid()); +#else + MESSAGE(" RegistryService::ping() pid "<< _getpid()); +#endif } diff --git a/src/SALOMELocalTrace/utilities.h b/src/SALOMELocalTrace/utilities.h index 0c8b3d696..c20c835a0 100644 --- a/src/SALOMELocalTrace/utilities.h +++ b/src/SALOMELocalTrace/utilities.h @@ -92,7 +92,7 @@ #error INFOS_COMPILATION already defined #endif -#ifdef _DEBUG_ +#if defined(_DEBUG_) || defined(_DEBUG) // --- the following MACROS are useful at debug time -- 2.39.2