summaryrefslogtreecommitdiff
path: root/ACE
diff options
context:
space:
mode:
Diffstat (limited to 'ACE')
-rw-r--r--ACE/NEWS7
-rw-r--r--ACE/ace/Atomic_Op_GCC_T.inl34
-rw-r--r--ACE/ace/SSL/SSL_Context.cpp14
-rw-r--r--ACE/bin/MakeProjectCreator/config/conv_lib.mpb6
-rw-r--r--ACE/examples/Threads/process_mutex.cpp2
-rw-r--r--ACE/tests/Signal_Test.cpp8
6 files changed, 31 insertions, 40 deletions
diff --git a/ACE/NEWS b/ACE/NEWS
index 87c0c357e37..dae99d48c7d 100644
--- a/ACE/NEWS
+++ b/ACE/NEWS
@@ -1,12 +1,17 @@
USER VISIBLE CHANGES BETWEEN ACE-7.0.3 and ACE-7.0.4
====================================================
-. Cleanup Embarcadero C++ Builder support
+. Add support for Embarcadero C++ Builder 11.0 Alexandria using
+ the bcc32c compiler
. Allow ACE_Module and ACE_SOCK_Dgram_Mcast to be sub-classed
. Add ACE_SWAP_LONG_LONG byte swap macro for ACE_UINT64
+. Improved ACE_Atomic implementation for g++
+
+. Various cleanup and using more C++11 features
+
USER VISIBLE CHANGES BETWEEN ACE-7.0.2 and ACE-7.0.3
====================================================
diff --git a/ACE/ace/Atomic_Op_GCC_T.inl b/ACE/ace/Atomic_Op_GCC_T.inl
index b102d422395..ed0f5eb232a 100644
--- a/ACE/ace/Atomic_Op_GCC_T.inl
+++ b/ACE/ace/Atomic_Op_GCC_T.inl
@@ -29,91 +29,91 @@ template <typename T>
ACE_INLINE T
ACE_Atomic_Op_GCC<T>::operator++ ()
{
- return __sync_add_and_fetch (&this->value_, 1);
+ return __atomic_add_fetch (&value_, 1, __ATOMIC_ACQ_REL);
}
template <typename T>
ACE_INLINE T
ACE_Atomic_Op_GCC<T>::operator++ (int)
{
- return __sync_fetch_and_add (&this->value_, 1);
+ return __atomic_fetch_add (&value_, 1, __ATOMIC_ACQ_REL);
}
template <typename T>
ACE_INLINE T
ACE_Atomic_Op_GCC<T>::operator-- ()
{
- return __sync_sub_and_fetch (&this->value_, 1);
+ return __atomic_sub_fetch (&value_, 1, __ATOMIC_ACQ_REL);
}
template <typename T>
ACE_INLINE T
ACE_Atomic_Op_GCC<T>::operator-- (int)
{
- return __sync_fetch_and_sub (&this->value_, 1);
+ return __atomic_fetch_sub (&value_, 1, __ATOMIC_ACQ_REL);
}
template <typename T>
ACE_INLINE T
ACE_Atomic_Op_GCC<T>::operator+= (T rhs)
{
- return __sync_add_and_fetch (&this->value_, rhs);
+ return __atomic_add_fetch (&value_, rhs, __ATOMIC_ACQ_REL);
}
template <typename T>
ACE_INLINE T
ACE_Atomic_Op_GCC<T>::operator-= (T rhs)
{
- return __sync_sub_and_fetch (&this->value_, rhs);
+ return __atomic_sub_fetch (&value_, rhs, __ATOMIC_ACQ_REL);
}
template <typename T>
ACE_INLINE bool
ACE_Atomic_Op_GCC<T>::operator== (T rhs) const
{
- return (this->value_ == rhs);
+ return __atomic_load_n (&value_, __ATOMIC_CONSUME) == rhs;
}
template <typename T>
ACE_INLINE bool
ACE_Atomic_Op_GCC<T>::operator!= (T rhs) const
{
- return (this->value_ != rhs);
+ return __atomic_load_n (&value_, __ATOMIC_CONSUME) != rhs;
}
template <typename T>
ACE_INLINE bool
ACE_Atomic_Op_GCC<T>::operator>= (T rhs) const
{
- return (this->value_ >= rhs);
+ return __atomic_load_n (&value_, __ATOMIC_CONSUME) >= rhs;
}
template <typename T>
ACE_INLINE bool
ACE_Atomic_Op_GCC<T>::operator> (T rhs) const
{
- return (this->value_ > rhs);
+ return __atomic_load_n (&value_, __ATOMIC_CONSUME) > rhs;
}
template <typename T>
ACE_INLINE bool
ACE_Atomic_Op_GCC<T>::operator<= (T rhs) const
{
- return (this->value_ <= rhs);
+ return __atomic_load_n (&value_, __ATOMIC_CONSUME) <= rhs;
}
template <typename T>
ACE_INLINE bool
ACE_Atomic_Op_GCC<T>::operator< (T rhs) const
{
- return (this->value_ < rhs);
+ return __atomic_load_n (&value_, __ATOMIC_CONSUME) < rhs;
}
template <typename T>
ACE_INLINE ACE_Atomic_Op_GCC<T> &
ACE_Atomic_Op_GCC<T>::operator= (T rhs)
{
- (void) __sync_lock_test_and_set (&this->value_, rhs);
+ __atomic_store_n (&value_, rhs, __ATOMIC_RELEASE);
return *this;
}
@@ -122,7 +122,7 @@ ACE_INLINE ACE_Atomic_Op_GCC<T> &
ACE_Atomic_Op_GCC<T>::operator= (
const ACE_Atomic_Op_GCC<T> &rhs)
{
- (void) __sync_lock_test_and_set (&this->value_, rhs.value_);
+ __atomic_store_n (&value_, __atomic_load_n (&rhs.value_, __ATOMIC_CONSUME), __ATOMIC_RELEASE);
return *this;
}
@@ -130,21 +130,21 @@ template <typename T>
ACE_INLINE T
ACE_Atomic_Op_GCC<T>::exchange (T newval)
{
- return __sync_val_compare_and_swap (&this->value_, this->value_, newval);
+ return __atomic_exchange_n (&value_, newval, __ATOMIC_ACQ_REL);
}
template <typename T>
ACE_INLINE T
ACE_Atomic_Op_GCC<T>::value () const
{
- return this->value_;
+ return __atomic_load_n (&value_, __ATOMIC_CONSUME);
}
template <typename T>
ACE_INLINE volatile T &
ACE_Atomic_Op_GCC<T>::value_i ()
{
- return this->value_;
+ return value_;
}
ACE_END_VERSIONED_NAMESPACE_DECL
diff --git a/ACE/ace/SSL/SSL_Context.cpp b/ACE/ace/SSL/SSL_Context.cpp
index 3dcfa078cae..ebc883ed93a 100644
--- a/ACE/ace/SSL/SSL_Context.cpp
+++ b/ACE/ace/SSL/SSL_Context.cpp
@@ -408,8 +408,8 @@ ACE_SSL_Context::check_host (const ACE_INET_Addr &host, SSL *peerssl)
char *peer = 0;
char **peerarg = ACE::debug () ? &peer : 0;
- int flags = X509_CHECK_FLAG_ALWAYS_CHECK_SUBJECT;
- size_t len = ACE_OS::strlen (name);
+ int const flags = X509_CHECK_FLAG_ALWAYS_CHECK_SUBJECT;
+ size_t const len = ACE_OS::strlen (name);
int const result = ::X509_check_host (cert, name, len, flags, peerarg);
@@ -417,7 +417,7 @@ ACE_SSL_Context::check_host (const ACE_INET_Addr &host, SSL *peerssl)
{
ACELIB_DEBUG ((LM_DEBUG,
ACE_TEXT ("ACE (%P|%t) SSL_Context::check_host ")
- ACE_TEXT ("name <%C> returns %d, peer <%s>\n"),
+ ACE_TEXT ("name <%C> returns %d, peer <%C>\n"),
name, result, peer));
}
if (peer != 0)
@@ -755,11 +755,11 @@ ACE_SSL_Context::report_error (unsigned long error_code)
}
void
-ACE_SSL_Context::report_error (void)
+ACE_SSL_Context::report_error ()
{
ACE_TRACE ("ACE_SSL_Context::report_error");
- unsigned long err = ::ERR_get_error ();
+ unsigned long const err = ::ERR_get_error ();
ACE_SSL_Context::report_error (err);
ACE_OS::last_error (err);
}
@@ -783,8 +783,8 @@ ACE_SSL_Context::dh_params (const char *file_name,
{
// Swiped from Rescorla's examples and the OpenSSL s_server.c app
- DH * ret=0;
- BIO * bio = 0;
+ DH * ret = nullptr;
+ BIO * bio = nullptr;
if ((bio = ::BIO_new_file (this->dh_params_.file_name (), "r")) == 0)
{
diff --git a/ACE/bin/MakeProjectCreator/config/conv_lib.mpb b/ACE/bin/MakeProjectCreator/config/conv_lib.mpb
deleted file mode 100644
index 3d4221c5baf..00000000000
--- a/ACE/bin/MakeProjectCreator/config/conv_lib.mpb
+++ /dev/null
@@ -1,6 +0,0 @@
-// -*- MPC -*-
-project {
- specific {
- install_this_target = 1
- }
-}
diff --git a/ACE/examples/Threads/process_mutex.cpp b/ACE/examples/Threads/process_mutex.cpp
index 9dcf9d97257..dd87c923577 100644
--- a/ACE/examples/Threads/process_mutex.cpp
+++ b/ACE/examples/Threads/process_mutex.cpp
@@ -8,8 +8,6 @@
#include "ace/Log_Msg.h"
#include "ace/Process_Mutex.h"
-
-
#if defined (ACE_HAS_THREADS)
static sig_atomic_t done;
diff --git a/ACE/tests/Signal_Test.cpp b/ACE/tests/Signal_Test.cpp
index 600e2de5f75..69f28f94ac7 100644
--- a/ACE/tests/Signal_Test.cpp
+++ b/ACE/tests/Signal_Test.cpp
@@ -11,7 +11,6 @@
*/
//=============================================================================
-
#include "test_config.h"
#include "ace/Thread_Manager.h"
#include "ace/Process.h"
@@ -25,8 +24,6 @@
#include "ace/OS_NS_stdlib.h"
#include "ace/SString.h"
-
-
#if !defined (ACE_LACKS_UNIX_SIGNALS) && !defined ACE_LACKS_SIGNAL
// Global options.
@@ -54,7 +51,6 @@ handle_signal (int signum)
// they are "unsafe" when handler is invoked asynchronously. On
// NetBSD 3.X, calls to change the thread's signal mask block as
// a lock seems to be held by the signal trampoline code.
-
#if 0
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("(%P|%t) received signal %S\n"),
@@ -165,7 +161,6 @@ synchronous_signal_handler (void *)
// This function arranges to handle signals asynchronously, which is
// necessary if an OS platform lacks threads.
-
static ACE_THR_FUNC_RETURN
asynchronous_signal_handler (void *)
{
@@ -185,8 +180,7 @@ asynchronous_signal_handler (void *)
// Register the <handle_signal> method to process all the signals in
// <sigset>.
- ACE_Sig_Action sa (sigset,
- (ACE_SignalHandler) handle_signal);
+ ACE_Sig_Action sa (sigset, (ACE_SignalHandler)handle_signal);
ACE_UNUSED_ARG (sa);
return 0;