summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>2005-11-22 09:23:56 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>2005-11-22 09:23:56 +0000
commit5211bacfec5e49a8ca55ff9c1229acea864e5d8e (patch)
tree6d5ee1c166594c8c086e3f2c7f042e1359cdee2c
parent38a7e1730e675cff606d6bbffa7784b2585e3d2f (diff)
downloadATCD-5211bacfec5e49a8ca55ff9c1229acea864e5d8e.tar.gz
ChangeLogTag:Mon Nov 21 23:56:06 2005 Ossama Othman <ossama@dre.vanderbilt.edu>
-rw-r--r--ChangeLog64
-rw-r--r--Kokyu/tests/DSRT_MIF/DSRT_MIF.mpc2
-rw-r--r--ace/OS_NS_Thread.cpp2
-rw-r--r--ace/Obchunk.cpp4
-rw-r--r--ace/Obchunk.h7
-rw-r--r--ace/Obchunk.inl7
-rw-r--r--ace/Object_Manager.cpp11
-rw-r--r--ace/Object_Manager.h7
-rw-r--r--ace/Object_Manager.inl7
-rw-r--r--ace/Object_Manager_Base.cpp5
-rw-r--r--ace/Object_Manager_Base.h6
-rw-r--r--ace/Obstack.cpp4
-rw-r--r--ace/Obstack.h4
-rw-r--r--ace/Obstack_T.cpp4
-rw-r--r--ace/Obstack_T.h6
-rw-r--r--ace/Obstack_T.inl6
-rw-r--r--ace/SSL/SSL_Context.cpp143
-rw-r--r--ace/SSL/SSL_Context.h33
-rw-r--r--ace/ace_for_tao.mpc2
-rw-r--r--ace/ace_threads_for_tao.mpc2
-rw-r--r--ace/ace_timer_for_tao.mpc33
-rw-r--r--apps/drwho/drwho.mpc2
-rw-r--r--apps/soreduce/soreduce.mpc2
-rw-r--r--bin/MakeProjectCreator/config/acetimerlib_for_tao.mpb10
-rw-r--r--examples/APG/Active_Objects/active_objects.mpc4
-rw-r--r--examples/APG/Misc_IPC/misc_ipc.mpc6
-rw-r--r--examples/APG/Shared_Memory/shared_memory.mpc4
-rw-r--r--examples/APG/ThreadPools/threadpools.mpc2
-rw-r--r--examples/APG/ThreadSafety/threadsafety.mpc4
-rw-r--r--examples/ASX/Event_Server/Event_Server/Event.mpc2
30 files changed, 267 insertions, 128 deletions
diff --git a/ChangeLog b/ChangeLog
index 6c2b1909aa7..80c76b3a384 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,67 @@
+Mon Nov 21 23:56:06 2005 Ossama Othman <ossama@dre.vanderbilt.edu>
+
+ * ace/ace_for_tao.mpc:
+ * ace/ace_threads_for_tao.mpc:
+
+ Moved ACE_crc32.cpp to ace_threads_for_tao subset within
+ Windows compiler conditional. It is only needed by the
+ SV_Semaphore_Simple listed within that conditional block.
+
+ * ace/ace_timer_for_tao.mpc:
+ * bin/MakeProjectCreator/config/acetimerlib_for_tao.mpb:
+
+ New ACE_FOR_TAO timer library subset.
+
+ * ace/Obchunk.cpp:
+ * ace/Obchunk.h:
+ * ace/Obchunk.inl:
+ * ace/Object_Manager.cpp:
+ * ace/Object_Manager.h:
+ * ace/Object_Manager.inl:
+ * ace/Object_Manager_Base.cpp:
+ * ace/Object_Manager_Base.h:
+ * ace/Obstack.cpp:
+ * ace/Obstack.h:
+ * ace/Obstack_T.cpp:
+ * ace/Obstack_T.h:
+ * ace/Obstack_T.inl:
+
+ Added missing versioned namespace support.
+
+ * ace/SSL/SSL_Context.h:
+
+ Removed ACE_SSL_locking_callback prototype since it is not part
+ of the public interface, and since a prototype (and definition)
+ already exists in the SSL_Context.cpp implementation file.
+
+ Removed static class members and placed them in anonymous
+ namespace in the implementation file.
+
+ * ace/SSL_Context.cpp:
+
+ Static class members are now in an anonymous namespace. There's
+ no need to expose them in the corresponding header.
+
+ Mangle global SSL callback functions with the appropriate
+ versioned namespace name, if enabled.
+
+ Improved exception safety of lock memory management and
+ lock acquisition/release by taking advantage of an
+ ACE_Auto_Basic_Array_Ptr and ACE_Mutex, respectively.
+
+ * Kokyu/tests/DSRT_MIF/DSRT_MIF.mpc:
+ * apps/drwho/drwho.mpc:
+ * apps/soreduce/soreduce.mpc:
+ * examples/APG/Active_Objects/active_objects.mpc:
+ * examples/APG/Misc_IPC/misc_ipc.mpc:
+ * examples/APG/Shared_Memory/shared_memory.mpc:
+ * examples/APG/ThreadPools/threadpools.mpc:
+ * examples/APG/ThreadSafety/threadsafety.mpc:
+ * examples/ASX/Event_Server/Event_Server/Event.mpc:
+
+ Inherit from the appropriate ACE_FOR_TAO subset MPC base
+ project. Addresses unresolved symbol errors.
+
Tue Nov 22 09:33:30 (IST) 2005 Bala Natarajan <bala_natarajan@symantec.com>
* bin/MakeProjectCreator/config/portablegroup.mpb:
diff --git a/Kokyu/tests/DSRT_MIF/DSRT_MIF.mpc b/Kokyu/tests/DSRT_MIF/DSRT_MIF.mpc
index 3a0b0dd4185..c600d29a8d6 100644
--- a/Kokyu/tests/DSRT_MIF/DSRT_MIF.mpc
+++ b/Kokyu/tests/DSRT_MIF/DSRT_MIF.mpc
@@ -1,6 +1,6 @@
// -*- MPC -*-
// $Id$
-project: kokyu {
+project: kokyu, acethreadslib_for_tao, acetimerlib_for_tao {
exename = MIF
}
diff --git a/ace/OS_NS_Thread.cpp b/ace/OS_NS_Thread.cpp
index 52f4b797da2..a0c0565122f 100644
--- a/ace/OS_NS_Thread.cpp
+++ b/ace/OS_NS_Thread.cpp
@@ -912,7 +912,7 @@ ACE_TSS_Cleanup::thread_exit (void)
extern "C" void
ACE_TSS_Cleanup_keys_destroyer (void *tss_keys)
{
- delete reinterpret_cast <ACE_TSS_Keys *> (tss_keys);
+ delete static_cast <ACE_TSS_Keys *> (tss_keys);
}
ACE_TSS_Cleanup::ACE_TSS_Cleanup (void)
diff --git a/ace/Obchunk.cpp b/ace/Obchunk.cpp
index 60a7f9b7a37..0d1de440fcb 100644
--- a/ace/Obchunk.cpp
+++ b/ace/Obchunk.cpp
@@ -8,6 +8,8 @@
ACE_RCSID(ace, Obchunk, "$Id$")
+ACE_BEGIN_VERSIONED_NAMESPACE_DECL
+
ACE_ALLOC_HOOK_DEFINE(ACE_Obchunk)
void
@@ -30,3 +32,5 @@ ACE_Obchunk::ACE_Obchunk (size_t size)
next_ (0)
{
}
+
+ACE_END_VERSIONED_NAMESPACE_DECL
diff --git a/ace/Obchunk.h b/ace/Obchunk.h
index d901c030dd2..9690c39f9d1 100644
--- a/ace/Obchunk.h
+++ b/ace/Obchunk.h
@@ -1,4 +1,5 @@
-/* -*- C++ -*- */
+// -*- C++ -*-
+
//=============================================================================
/**
* @file Obchunk.h
@@ -20,6 +21,8 @@
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
+ACE_BEGIN_VERSIONED_NAMESPACE_DECL
+
/**
* @class ACE_Obchunk
*
@@ -64,6 +67,8 @@ public:
char contents_[4];
};
+ACE_END_VERSIONED_NAMESPACE_DECL
+
#if defined (__ACE_INLINE__)
#include "ace/Obchunk.inl"
#endif /* __ACE_INLINE__ */
diff --git a/ace/Obchunk.inl b/ace/Obchunk.inl
index bffb7626155..4853b0e12aa 100644
--- a/ace/Obchunk.inl
+++ b/ace/Obchunk.inl
@@ -1,7 +1,12 @@
-/* -*- C++ -*- */
+// -*- C++ -*-
+//
// $Id$
+ACE_BEGIN_VERSIONED_NAMESPACE_DECL
+
ACE_INLINE
ACE_Obchunk::~ACE_Obchunk (void)
{
}
+
+ACE_END_VERSIONED_NAMESPACE_DECL
diff --git a/ace/Object_Manager.cpp b/ace/Object_Manager.cpp
index 73327e35002..84c204d15b4 100644
--- a/ace/Object_Manager.cpp
+++ b/ace/Object_Manager.cpp
@@ -49,6 +49,8 @@ ACE_RCSID(ace, Object_Manager, "$Id$")
# define ACE_APPLICATION_PREALLOCATED_ARRAY_DELETIONS
#endif /* ACE_APPLICATION_PREALLOCATED_ARRAY_DELETIONS */
+ACE_BEGIN_VERSIONED_NAMESPACE_DECL
+
// Singleton pointer.
ACE_Object_Manager *ACE_Object_Manager::instance_ = 0;
@@ -112,13 +114,6 @@ private:
ACE_Static_Svc_Descriptor ace_svc_desc_ACE_Service_Manager;
};
-// We can't use the ACE_SVC_FACTORY_DECLARE macro here because this
-// needs to be in the ACE_Export context rather than the
-// ACE_Svc_Export context.
-//extern "C" ACE_Export
-//ACE_Service_Object *
-//_make_ACE_Service_Manager (ACE_Service_Object_Exterminator *);
-
ACE_Object_Manager_Preallocations::ACE_Object_Manager_Preallocations (void)
{
ACE_STATIC_SVC_DEFINE (ACE_Service_Manager_initializer,
@@ -881,3 +876,5 @@ ACE_Static_Object_Lock::cleanup_lock (void)
# pragma instantiate ACE_Cleanup_Adapter<ACE_SYNCH_RW_MUTEX>
# pragma instantiate ACE_Managed_Object<ACE_SYNCH_RW_MUTEX>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
+
+ACE_END_VERSIONED_NAMESPACE_DECL
diff --git a/ace/Object_Manager.h b/ace/Object_Manager.h
index 4fa9325ef0c..7255b985614 100644
--- a/ace/Object_Manager.h
+++ b/ace/Object_Manager.h
@@ -38,6 +38,8 @@ class ACE_Sig_Set;
# include "ace/Recursive_Thread_Mutex.h"
#endif /* ACE_MT_SAFE */
+ACE_BEGIN_VERSIONED_NAMESPACE_DECL
+
// only used by ACE_OS_Object_Manager::ctor
# if defined (ACE_WIN32)
// Default WIN32 structured exception handler.
@@ -423,6 +425,7 @@ private:
ACE_Object_Manager &operator= (const ACE_Object_Manager &);
};
+ACE_END_VERSIONED_NAMESPACE_DECL
#include "ace/Static_Object_Lock.h"
@@ -437,9 +440,7 @@ private:
// needs to be in the ACE_Export context rather than the
// ACE_Svc_Export context.
class ACE_Service_Object;
-extern "C" ACE_Export
-ACE_Service_Object *
-_make_ACE_Service_Manager (ACE_Service_Object_Exterminator *);
+ACE_FACTORY_DECLARE (ACE, ACE_Service_Manager)
#endif /* ! ACE_LACKS_ACE_SVCCONF */
diff --git a/ace/Object_Manager.inl b/ace/Object_Manager.inl
index 19ba4079a9c..9c78d96f4a9 100644
--- a/ace/Object_Manager.inl
+++ b/ace/Object_Manager.inl
@@ -1,6 +1,9 @@
-/* -*- C++ -*- */
+// -*- C++ -*-
+//
// $Id$
+ACE_BEGIN_VERSIONED_NAMESPACE_DECL
+
ACE_INLINE
int
ACE_Object_Manager::at_exit (ACE_Cleanup *object,
@@ -33,3 +36,5 @@ ACE_Object_Manager::default_mask (void)
return
*reinterpret_cast<ACE_Sig_Set *> (ACE_OS_Object_Manager::default_mask ());
}
+
+ACE_END_VERSIONED_NAMESPACE_DECL
diff --git a/ace/Object_Manager_Base.cpp b/ace/Object_Manager_Base.cpp
index 4a04cb16348..f61247558e9 100644
--- a/ace/Object_Manager_Base.cpp
+++ b/ace/Object_Manager_Base.cpp
@@ -1,4 +1,3 @@
-// -*- C++ -*-
// $Id$
#include "ace/Object_Manager_Base.h"
@@ -11,6 +10,8 @@ ACE_RCSID(ace, Object_Manager_Base, "$Id$")
#include "ace/OS_NS_signal.h"
#include "ace/OS_NS_stdio.h"
+ACE_BEGIN_VERSIONED_NAMESPACE_DECL
+
#if defined (ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS)
int ACE_SEH_Default_Exception_Selector (void *)
{
@@ -501,3 +502,5 @@ ACE_OS_Object_Manager_Manager::~ACE_OS_Object_Manager_Manager (void)
static ACE_OS_Object_Manager_Manager ACE_OS_Object_Manager_Manager_instance;
#endif /* ! ACE_HAS_NONSTATIC_OBJECT_MANAGER */
+
+ACE_END_VERSIONED_NAMESPACE_DECL
diff --git a/ace/Object_Manager_Base.h b/ace/Object_Manager_Base.h
index 4188e008835..83f5d91354c 100644
--- a/ace/Object_Manager_Base.h
+++ b/ace/Object_Manager_Base.h
@@ -1,4 +1,4 @@
-/* -*- C++ -*- */
+// -*- C++ -*-
//=============================================================================
/**
@@ -29,6 +29,8 @@
#include "ace/os_include/sys/os_types.h"
#include "ace/os_include/os_signal.h"
+ACE_BEGIN_VERSIONED_NAMESPACE_DECL
+
class ACE_Object_Manager;
class ACE_OS_Object_Manager_Manager;
class ACE_TSS_Cleanup;
@@ -248,5 +250,7 @@ public:
friend void ACE_OS_Object_Manager_Internal_Exit_Hook ();
};
+ACE_END_VERSIONED_NAMESPACE_DECL
+
#include /**/ "ace/post.h"
#endif /* ACE_OBJECT_MANAGER_BASE_H */
diff --git a/ace/Obstack.cpp b/ace/Obstack.cpp
index d794f1263fe..792a398ba8a 100644
--- a/ace/Obstack.cpp
+++ b/ace/Obstack.cpp
@@ -4,8 +4,12 @@
ACE_RCSID(ace, Obstack, "$Id$")
+ACE_BEGIN_VERSIONED_NAMESPACE_DECL
+
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
template class ACE_Obstack_T<char>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
#pragma instantiate ACE_Obstack_T<char>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
+
+ACE_END_VERSIONED_NAMESPACE_DECL
diff --git a/ace/Obstack.h b/ace/Obstack.h
index 6312ecb7fc1..511f7715f69 100644
--- a/ace/Obstack.h
+++ b/ace/Obstack.h
@@ -19,9 +19,13 @@
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
+ACE_BEGIN_VERSIONED_NAMESPACE_DECL
+
ACE_SINGLETON_DECLARATION (ACE_Obstack_T <char>;)
typedef ACE_Obstack_T<char> ACE_Obstack;
+ACE_END_VERSIONED_NAMESPACE_DECL
+
#include /**/ "ace/post.h"
#endif /* ACE_OBSTACK_H */
diff --git a/ace/Obstack_T.cpp b/ace/Obstack_T.cpp
index e6baeb61e41..f7b781eee21 100644
--- a/ace/Obstack_T.cpp
+++ b/ace/Obstack_T.cpp
@@ -15,6 +15,8 @@
#include "ace/Obstack_T.inl"
#endif /* __ACE_INLINE__ */
+ACE_BEGIN_VERSIONED_NAMESPACE_DECL
+
ACE_ALLOC_HOOK_DEFINE(ACE_Obstack_T)
template <class CHAR> void
@@ -201,4 +203,6 @@ ACE_Obstack_T<CHAR>::release (void)
this->curr_->block_ = this->curr_->cur_ = this->curr_->contents_;
}
+ACE_END_VERSIONED_NAMESPACE_DECL
+
#endif /* ACE_OBSTACK_T_CPP */
diff --git a/ace/Obstack_T.h b/ace/Obstack_T.h
index d070b011bea..486c789d738 100644
--- a/ace/Obstack_T.h
+++ b/ace/Obstack_T.h
@@ -1,4 +1,4 @@
-/* -*- C++ -*- */
+// -*- C++ -*-
//=============================================================================
/**
@@ -22,7 +22,7 @@
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-// #include "ace/Basic_Types.h"
+ACE_BEGIN_VERSIONED_NAMESPACE_DECL
class ACE_Allocator;
@@ -116,6 +116,8 @@ protected:
class ACE_Obchunk *curr_;
};
+ACE_END_VERSIONED_NAMESPACE_DECL
+
#if defined (__ACE_INLINE__)
#include "ace/Obstack_T.inl"
#endif /* __ACE_INLINE__ */
diff --git a/ace/Obstack_T.inl b/ace/Obstack_T.inl
index 57e049ef1ea..92c90cd44d9 100644
--- a/ace/Obstack_T.inl
+++ b/ace/Obstack_T.inl
@@ -1,5 +1,9 @@
+// -*- C++ -*-
+//
// $Id$
+ACE_BEGIN_VERSIONED_NAMESPACE_DECL
+
template <class CHAR> ACE_INLINE size_t
ACE_Obstack_T<CHAR>::length () const
{
@@ -29,3 +33,5 @@ ACE_Obstack_T<CHAR>::freeze (void)
this->curr_->block_ = this->curr_->cur_;
return retv;
}
+
+ACE_END_VERSIONED_NAMESPACE_DECL
diff --git a/ace/SSL/SSL_Context.cpp b/ace/SSL/SSL_Context.cpp
index bd7af2f3fce..f91b1a627f7 100644
--- a/ace/SSL/SSL_Context.cpp
+++ b/ace/SSL/SSL_Context.cpp
@@ -1,5 +1,3 @@
-#include "ace/OS_NS_string.h"
-#include "ace/ACE.h"
#include "SSL_Context.h"
#include "sslconf.h"
@@ -8,12 +6,20 @@
#include "SSL_Context.inl"
#endif /* __ACE_INLINE__ */
+#include "ace/Mutex.h"
#include "ace/Guard_T.h"
#include "ace/Object_Manager.h"
#include "ace/Log_Msg.h"
#include "ace/Singleton.h"
#include "ace/Synch_Traits.h"
+#include "ace/ACE.h"
#include "ace/OS_NS_errno.h"
+#include "ace/OS_NS_string.h"
+
+#ifdef ACE_HAS_THREADS
+# include "ace/Auto_Ptr.h"
+# include "ace/OS_NS_Thread.h"
+#endif /* ACE_HAS_THREADS */
#include <openssl/x509.h>
#include <openssl/err.h>
@@ -24,55 +30,87 @@ ACE_RCSID (ACE_SSL,
"$Id$")
-#ifdef ACE_HAS_THREADS
-void
-ACE_SSL_locking_callback (int mode,
- int type,
- const char * /* file */,
- int /* line */)
+namespace
{
- // #ifdef undef
- // fprintf(stderr,"thread=%4d mode=%s lock=%s %s:%d\n",
- // CRYPTO_thread_id(),
- // (mode&CRYPTO_LOCK)?"l":"u",
- // (type&CRYPTO_READ)?"r":"w",file,line);
- // #endif
- // /*
- // if (CRYPTO_LOCK_SSL_CERT == type)
- // fprintf(stderr,"(t,m,f,l) %ld %d %s %d\n",
- // CRYPTO_thread_id(),
- // mode,file,line);
- // */
- if (mode & CRYPTO_LOCK)
- ACE_OS::mutex_lock (&(ACE_SSL_Context::lock_[type]));
- else
- ACE_OS::mutex_unlock (&(ACE_SSL_Context::lock_[type]));
+ /// Reference count of the number of times the ACE_SSL_Context was
+ /// initialized.
+ int ssl_library_init_count = 0;
+
+ // @@ This should also be done with a singleton, otherwise it is not
+ // thread safe and/or portable to some weird platforms...
+
+#ifdef ACE_HAS_THREADS
+ /// Array of mutexes used internally by OpenSSL when the SSL
+ /// application is multithreaded.
+ ACE_Auto_Basic_Array_Ptr<ACE_Mutex> ssl_locks;
+
+ // @@ This should also be managed by a singleton.
+#endif
}
-// -------------------------------
+#ifdef ACE_HAS_THREADS
+
+# if (defined (ACE_HAS_VERSIONED_NAMESPACE) \
+ && ACE_HAS_VERSIONED_NAMESPACE == 1) \
+ && !(defined (_MSC_VER) && _MSC_VER <= 1200)
+// MSVC++ 6's preprocessor can't handle macro expansions required by
+// the versioned namespace support. *sigh*
+
+# define ACE_SSL_LOCKING_CALLBACK_NAME ACE_PREPROC_CONCATENATE(ACE_VERSIONED_NAMESPACE_NAME, _ACE_SSL_locking_callback)
+# define ACE_SSL_THREAD_ID_NAME ACE_PREPROC_CONCATENATE(ACE_VERSIONED_NAMESPACE_NAME, _ACE_SSL_thread_id)
+
+# else
+
+# define ACE_SSL_LOCKING_CALLBACK_NAME ACE_SSL_locking_callback
+# define ACE_SSL_THREAD_ID_NAME ACE_SSL_thread_id
+
+# endif /* ACE_HAS_VERSIONED_NAMESPACE == 1 */
+
+
extern "C"
{
- /// Return the current thread ID. OpenSSL uses this on platforms
- /// that need it.
+ void
+ ACE_SSL_LOCKING_CALLBACK_NAME (int mode,
+ int type,
+ const char * /* file */,
+ int /* line */)
+ {
+ // #ifdef undef
+ // fprintf(stderr,"thread=%4d mode=%s lock=%s %s:%d\n",
+ // CRYPTO_thread_id(),
+ // (mode&CRYPTO_LOCK)?"l":"u",
+ // (type&CRYPTO_READ)?"r":"w",file,line);
+ // #endif
+ // /*
+ // if (CRYPTO_LOCK_SSL_CERT == type)
+ // fprintf(stderr,"(t,m,f,l) %ld %d %s %d\n",
+ // CRYPTO_thread_id(),
+ // mode,file,line);
+ // */
+ if (mode & CRYPTO_LOCK)
+ (void) ssl_locks[type].acquire ();
+ else
+ (void) ssl_locks[type].release ();
+ }
+
+ // -------------------------------
+
+ // Return the current thread ID. OpenSSL uses this on platforms
+ // that need it.
unsigned long
- ACE_SSL_thread_id (void)
+ ACE_SSL_THREAD_ID_NAME (void)
{
return (unsigned long) ACE_OS::thr_self ();
}
}
#endif /* ACE_HAS_THREADS */
+
// ****************************************************************
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
-#ifdef ACE_HAS_THREADS
-ACE_mutex_t * ACE_SSL_Context::lock_ = 0;
-#endif /* ACE_HAS_THREADS */
-
-int ACE_SSL_Context::library_init_count_ = 0;
-
ACE_SSL_Context::ACE_SSL_Context (void)
: context_ (0),
mode_ (-1),
@@ -106,34 +144,21 @@ ACE_SSL_Context::ssl_library_init (void)
ace_ssl_mon,
*ACE_Static_Object_Lock::instance ()));
- if (ACE_SSL_Context::library_init_count_ == 0)
+ if (ssl_library_init_count == 0)
{
// Initialize the locking callbacks before initializing anything
// else.
#ifdef ACE_HAS_THREADS
- int num_locks = ::CRYPTO_num_locks ();
+ int const num_locks = ::CRYPTO_num_locks ();
- ACE_NEW (ACE_SSL_Context::lock_,
- ACE_mutex_t[num_locks]);
-
- for (int i = 0; i < num_locks; ++i)
- {
- // rwlock_init(&(ACE_SSL_Context::lock_[i]), USYNC_THREAD,
- // 0);
- if (ACE_OS::mutex_init (&(ACE_SSL_Context::lock_[i]),
- USYNC_THREAD) != 0)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("(%P|%t) ACE_SSL_Context::ssl_library_init ")
- ACE_TEXT ("- %p\n"),
- ACE_TEXT ("mutex_init")));
- }
+ ssl_locks.reset (new ACE_Mutex[num_locks]);
# if !defined (WIN32)
// This call isn't necessary on some platforms. See the CRYPTO
// library's threads(3) man page for details.
- ::CRYPTO_set_id_callback (ACE_SSL_thread_id);
-# endif /* WIN32 */
- ::CRYPTO_set_locking_callback (ACE_SSL_locking_callback);
+ ::CRYPTO_set_id_callback (ACE_SSL_THREAD_ID_NAME);
+# endif /* !WIN32 */
+ ::CRYPTO_set_locking_callback (ACE_SSL_LOCKING_CALLBACK_NAME);
#endif /* ACE_HAS_THREADS */
::SSLeay_add_ssl_algorithms ();
@@ -169,7 +194,7 @@ ACE_SSL_Context::ssl_library_init (void)
}
- ++ACE_SSL_Context::library_init_count_;
+ ++ssl_library_init_count;
}
void
@@ -179,8 +204,8 @@ ACE_SSL_Context::ssl_library_fini (void)
ace_ssl_mon,
*ACE_Static_Object_Lock::instance ()));
- --ACE_SSL_Context::library_init_count_;
- if (ACE_SSL_Context::library_init_count_ == 0)
+ --ssl_library_init_count;
+ if (ssl_library_init_count == 0)
{
::ERR_free_strings ();
::EVP_cleanup ();
@@ -188,13 +213,7 @@ ACE_SSL_Context::ssl_library_fini (void)
// Clean up the locking callbacks after everything else has been
// cleaned up.
#ifdef ACE_HAS_THREADS
- int num_locks = ::CRYPTO_num_locks ();
-
::CRYPTO_set_locking_callback (0);
- for (int i = 0; i < num_locks; ++i)
- ACE_OS::mutex_destroy (&(ACE_SSL_Context::lock_[i]));
-
- delete [] ACE_SSL_Context::lock_;
#endif /* ACE_HAS_THREADS */
}
}
diff --git a/ace/SSL/SSL_Context.h b/ace/SSL/SSL_Context.h
index 565325362a7..f06d1ac04a7 100644
--- a/ace/SSL/SSL_Context.h
+++ b/ace/SSL/SSL_Context.h
@@ -7,6 +7,7 @@
* $Id$
*
* @author Carlos O'Ryan <coryan@ece.uci.edu>
+ * @author Ossama Othman <ossama@dre.vanderbilt.edu>
*/
//=============================================================================
@@ -24,23 +25,8 @@
#include "ace/SString.h"
-#ifdef ACE_HAS_THREADS
-# include "ace/OS_NS_Thread.h"
-#endif /* ACE_HAS_THREADS */
-
#include <openssl/ssl.h>
-#ifdef ACE_HAS_THREADS
-extern "C"
-{
- /// Mutex locking/unlocking callback for OpenSSL multithread
- /// support.
- void ACE_SSL_locking_callback (int mode,
- int type,
- const char * file,
- int line);
-}
-#endif /* ACE_HAS_THREADS */
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
@@ -84,8 +70,6 @@ private:
*/
class ACE_SSL_Export ACE_SSL_Context
{
- friend void ACE_SSL_locking_callback (int, int, const char *, int);
-
public:
enum {
@@ -333,21 +317,6 @@ private:
/// count of successful CA load attempts
int have_ca_;
- /// Reference count of the number of times the ACE_SSL_Context was
- /// initialized.
- static int library_init_count_;
-
- // @@ This should also be done with a singleton, otherwise it is not
- // thread safe and/or portable to some weird platforms...
-
-#ifdef ACE_HAS_THREADS
- /// Array of mutexes used internally by OpenSSL when the SSL
- /// application is multithreaded.
- static ACE_mutex_t * lock_;
-
- // @@ This should also be managed by a singleton.
-#endif
-
};
ACE_END_VERSIONED_NAMESPACE_DECL
diff --git a/ace/ace_for_tao.mpc b/ace/ace_for_tao.mpc
index 36884fc3737..e734fb1a169 100644
--- a/ace/ace_for_tao.mpc
+++ b/ace/ace_for_tao.mpc
@@ -10,7 +10,6 @@ project(ACE_FOR_TAO) : acedefaults, core, svcconf, pkgconfig {
Source_Files(ACE_COMPONENTS) {
ACE.cpp
- ACE_crc32.cpp
Active_Map_Manager.cpp
Addr.cpp
Arg_Shifter.cpp
@@ -168,6 +167,7 @@ project(ACE_FOR_TAO) : acedefaults, core, svcconf, pkgconfig {
// ACE_Token implementation uses semaphores on Windows and VxWorks.
conditional(vc6,vc71,vc8,bmake) {
+ ACE_crc32.cpp // Required by SV_Semaphore_Simple
Semaphore.cpp
Process_Mutex.cpp
WFMO_Reactor.cpp
diff --git a/ace/ace_threads_for_tao.mpc b/ace/ace_threads_for_tao.mpc
index 3fa76332b92..8d9742e05e9 100644
--- a/ace/ace_threads_for_tao.mpc
+++ b/ace/ace_threads_for_tao.mpc
@@ -26,7 +26,7 @@ project(ACE_Threads_FOR_TAO) : acedefaults, core, pkgconfig, ace_for_tao {
Process_Mutex.cpp
SV_Semaphore_Simple.cpp
SV_Semaphore_Complex.cpp
- ACE_crc32.cpp
+ ACE_crc32.cpp // Required by SV_Semaphore_Simple
}
}
diff --git a/ace/ace_timer_for_tao.mpc b/ace/ace_timer_for_tao.mpc
new file mode 100644
index 00000000000..6106feea801
--- /dev/null
+++ b/ace/ace_timer_for_tao.mpc
@@ -0,0 +1,33 @@
+// -*- MPC -*-
+//
+// $Id$
+
+project(ACE_Timer_FOR_TAO) : acedefaults, core, pkgconfig, ace_for_tao, {
+
+ requires = ace_for_tao
+ libout = $(ACE_ROOT)/lib
+ sharedname = ACE_Timer_FOR_TAO
+ dynamicflags = ACE_BUILD_DLL
+
+ Source_Files(ACE_COMPONENTS) {
+ High_Res_Timer.cpp
+ Profile_Timer.cpp
+ Stats.cpp
+ }
+
+ Inline_Files {
+ High_Res_Timer.inl
+ Profile_Timer.inl
+ Stats.inl
+ }
+
+ Header_Files {
+ High_Res_Timer.h
+ Profile_Timer.h
+ Stats.h
+ }
+
+ Pkgconfig_Files {
+ ACE_Timer_FOR_TAO.pc.in
+ }
+}
diff --git a/apps/drwho/drwho.mpc b/apps/drwho/drwho.mpc
index 75362c9be14..fe9bb3f8b11 100644
--- a/apps/drwho/drwho.mpc
+++ b/apps/drwho/drwho.mpc
@@ -1,7 +1,7 @@
// -*- MPC -*-
// $Id$
-project(*-client) : aceexe {
+project(*-client) : aceexe, acememorylib_for_tao {
requires += rwho
avoids += uses_wchar
Source_Files {
diff --git a/apps/soreduce/soreduce.mpc b/apps/soreduce/soreduce.mpc
index 18f2e917796..87c6ce87509 100644
--- a/apps/soreduce/soreduce.mpc
+++ b/apps/soreduce/soreduce.mpc
@@ -1,6 +1,6 @@
// $Id$
-project(soreduce) : aceexe {
+project(soreduce) : aceexe, acethreadslib_for_tao {
avoids += uses_wchar
exename = soreduce
Source_Files {
diff --git a/bin/MakeProjectCreator/config/acetimerlib_for_tao.mpb b/bin/MakeProjectCreator/config/acetimerlib_for_tao.mpb
new file mode 100644
index 00000000000..d812f71f7fd
--- /dev/null
+++ b/bin/MakeProjectCreator/config/acetimerlib_for_tao.mpb
@@ -0,0 +1,10 @@
+// -*- MPC -*-
+//
+// $Id$
+
+feature(ace_for_tao) {
+
+ after += ACE_Timer_FOR_TAO
+ libs += ACE_Timer_FOR_TAO
+
+}
diff --git a/examples/APG/Active_Objects/active_objects.mpc b/examples/APG/Active_Objects/active_objects.mpc
index 262ae418a65..88cdc88a6a7 100644
--- a/examples/APG/Active_Objects/active_objects.mpc
+++ b/examples/APG/Active_Objects/active_objects.mpc
@@ -1,14 +1,14 @@
// -*- MPC -*-
// $Id$
-project(AO) : aceexe {
+project(AO) : aceexe, acethreadslib_for_tao {
exename = AO
Source_Files {
AO.cpp
}
}
-project(AO2) : aceexe {
+project(AO2) : aceexe, acethreadslib_for_tao {
exename = AO2
Source_Files {
AO2.cpp
diff --git a/examples/APG/Misc_IPC/misc_ipc.mpc b/examples/APG/Misc_IPC/misc_ipc.mpc
index d720f15999b..8bd71a7aeba 100644
--- a/examples/APG/Misc_IPC/misc_ipc.mpc
+++ b/examples/APG/Misc_IPC/misc_ipc.mpc
@@ -1,21 +1,21 @@
// -*- MPC -*-
// $Id$
-project(UDP Broadcast) : aceexe {
+project(UDP Broadcast) : aceexe, acesocketslib_for_tao {
exename = UDP_Broadcast
Source_Files {
UDP_Broadcast.cpp
}
}
-project(UDP Multicast) : aceexe {
+project(UDP Multicast) : aceexe, acesocketslib_for_tao {
exename = UDP_Multicast
Source_Files {
UDP_Multicast.cpp
}
}
-project(UDP Unicast) : aceexe {
+project(UDP Unicast) : aceexe, acesocketslib_for_tao {
exename = UDP_Unicast
Source_Files {
UDP_Unicast.cpp
diff --git a/examples/APG/Shared_Memory/shared_memory.mpc b/examples/APG/Shared_Memory/shared_memory.mpc
index 3e6c3729b17..26b68e3e146 100644
--- a/examples/APG/Shared_Memory/shared_memory.mpc
+++ b/examples/APG/Shared_Memory/shared_memory.mpc
@@ -1,7 +1,7 @@
// -*- MPC -*-
// $Id$
-project(*Hash Map) : aceexe {
+project(*Hash Map) : aceexe, acethreadslib_for_tao, acememorylib_for_tao {
exename = Hash_Map
Source_Files {
Hash_Map.cpp
@@ -29,7 +29,7 @@ project(PI Malloc) : aceexe {
}
}
-project(Pool Growth) : aceexe {
+project(Pool Growth) : aceexe, acethreadslib_for_tao, acememorylib_for_tao {
exename = Pool_Growth
Source_Files {
Pool_Growth.cpp
diff --git a/examples/APG/ThreadPools/threadpools.mpc b/examples/APG/ThreadPools/threadpools.mpc
index 1855f7b40a2..150458ac0d0 100644
--- a/examples/APG/ThreadPools/threadpools.mpc
+++ b/examples/APG/ThreadPools/threadpools.mpc
@@ -1,7 +1,7 @@
// -*- MPC -*-
// $Id$
-project(Futures) : aceexe {
+project(Futures) : aceexe, acethreadslib_for_tao {
exename = Futures
Source_Files {
Futures.cpp
diff --git a/examples/APG/ThreadSafety/threadsafety.mpc b/examples/APG/ThreadSafety/threadsafety.mpc
index 84c7d614ad6..abee2826972 100644
--- a/examples/APG/ThreadSafety/threadsafety.mpc
+++ b/examples/APG/ThreadSafety/threadsafety.mpc
@@ -8,7 +8,7 @@ project(Atomic Op) : aceexe {
}
}
-project(Barrier) : aceexe {
+project(Barrier) : aceexe, acethreadslib_for_tao {
exename = Barrier
Source_Files {
Barrier.cpp
@@ -29,7 +29,7 @@ project(RW Lock) : aceexe {
}
}
-project(Semaphore) : aceexe {
+project(Semaphore) : aceexe, acethreadslib_for_tao {
exename = Semaphore
Source_Files {
Semaphore.cpp
diff --git a/examples/ASX/Event_Server/Event_Server/Event.mpc b/examples/ASX/Event_Server/Event_Server/Event.mpc
index 7c31c7f1a5a..8f25cd16c2c 100644
--- a/examples/ASX/Event_Server/Event_Server/Event.mpc
+++ b/examples/ASX/Event_Server/Event_Server/Event.mpc
@@ -1,7 +1,7 @@
// -*- MPC -*-
// $Id$
-project(*Server) : aceexe {
+project(*Server) : aceexe, acetimerlib_for_tao {
exename = Event_Server
Source_Files {
Consumer_Router.cpp