chore(Deps/Acelite): Update to 6.5.10 (#3450)

This commit is contained in:
Kargatum
2020-11-11 22:09:02 +07:00
committed by GitHub
parent a93565b6da
commit e27201cee2
921 changed files with 18238 additions and 33164 deletions

View File

@@ -7,10 +7,13 @@
#include "ace/Log_Category.h"
#include "ace/OS_NS_string.h"
#include "ace/os_include/sys/os_mman.h"
#if defined (ACE_HAS_ALLOC_HOOKS)
# include "ace/Malloc_Base.h"
#endif /* ACE_HAS_ALLOC_HOOKS */
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_ALLOC_HOOK_DEFINE(ACE_Mutex)
ACE_ALLOC_HOOK_DEFINE (ACE_Mutex)
void
ACE_Mutex::dump (void) const
@@ -19,28 +22,39 @@ ACE_Mutex::dump (void) const
// ACE_TRACE ("ACE_Mutex::dump");
ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
#if defined (ACE_HAS_PTHREADS) || defined(ACE_HAS_STHREADS)
# ifdef ACE_MUTEX_USE_PROCESS_LOCK
ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("lockname_ = %s\n"), this->lockname_));
ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("process_lock_ = %x\n"), this->process_lock_));
#endif /* ACE_HAS_PTHREADS || ACE_HAS_STHREADS */
# endif /* ACE_MUTEX_USE_PROCESS_LOCK */
ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("\n")));
ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP));
#endif /* ACE_HAS_DUMP */
}
int
ACE_Mutex::unlink (const ACE_TCHAR *name)
{
#ifdef ACE_MUTEX_PROCESS_LOCK_IS_SEMA
return ACE_OS::sema_unlink (ACE_TEXT_ALWAYS_CHAR (name));
#else
ACE_UNUSED_ARG (name);
return 0;
#endif
}
ACE_Mutex::ACE_Mutex (int type, const ACE_TCHAR *name,
ACE_mutexattr_t *arg, mode_t mode)
:
#if defined (ACE_HAS_PTHREADS) || defined(ACE_HAS_STHREADS)
#ifdef ACE_MUTEX_USE_PROCESS_LOCK
process_lock_ (0),
lockname_ (0),
#endif /* ACE_HAS_PTHREADS || ACE_HAS_STHREADS */
#endif /* ACE_MUTEX_USE_PROCESS_LOCK */
removed_ (false)
{
// ACE_TRACE ("ACE_Mutex::ACE_Mutex");
// These platforms need process-wide mutex to be in shared memory.
#if defined(ACE_HAS_PTHREADS) || defined (ACE_HAS_STHREADS)
#ifdef ACE_MUTEX_PROCESS_LOCK_IS_MUTEX
if (type == USYNC_PROCESS)
{
// Let's see if the shared memory entity already exists.
@@ -86,29 +100,47 @@ ACE_Mutex::ACE_Mutex (int type, const ACE_TCHAR *name,
name,
arg) != 0)
{
ACELIB_ERROR ((LM_ERROR,
ACE_TEXT ("%p\n"),
ACE_TEXT ("ACE_Mutex::ACE_Mutex")));
return;
ACELIB_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"),
ACE_TEXT ("ACE_Mutex::ACE_Mutex")));
}
return;
}
else
{
// local mutex init if USYNC_PROCESS flag is not enabled.
#else
ACE_UNUSED_ARG (mode);
#endif /* ACE_HAS_PTHREADS || ACE_HAS_STHREADS */
if (ACE_OS::mutex_init (&this->lock_,
type,
name,
arg) != 0)
ACELIB_ERROR ((LM_ERROR,
ACE_TEXT ("%p\n"),
ACE_TEXT ("ACE_Mutex::ACE_Mutex")));
#if defined(ACE_HAS_PTHREADS) || defined (ACE_HAS_STHREADS)
#elif defined ACE_MUTEX_PROCESS_LOCK_IS_SEMA
ACE_UNUSED_ARG (mode);
if (type == USYNC_PROCESS)
{
if (name)
this->lockname_ = ACE_OS::strdup (name);
else
{
const size_t un_len = (ACE_UNIQUE_NAME_LEN + 1) * sizeof (ACE_TCHAR);
ACE_TCHAR *const un =
# ifdef ACE_HAS_ALLOC_HOOKS
(ACE_TCHAR *) ACE_Allocator::instance ()->malloc (un_len);
# else
(ACE_TCHAR *) ACE_OS::malloc (un_len);
# endif /* ACE_HAS_ALLOC_HOOKS */
un[0] = ACE_TEXT ('/');
ACE_OS::unique_name (this, un + 1, ACE_UNIQUE_NAME_LEN);
this->lockname_ = un;
}
this->process_lock_ = &this->process_sema_;
if (ACE_OS::sema_init (&this->process_sema_, 1 /*mutex unlocked*/,
USYNC_PROCESS, this->lockname_) != 0)
ACELIB_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"),
ACE_TEXT ("ACE_Mutex::ACE_Mutex")));
ACE_OS::sema_avoid_unlink (&this->process_sema_, true);
return;
}
#endif /* ACE_HAS_PTHREADS || ACE_HAS_STHREADS */
#else
ACE_UNUSED_ARG (mode);
#endif /* ACE_MUTEX_PROCESS_LOCK_IS_MUTEX */
if (ACE_OS::mutex_init (&this->lock_, type, name, arg) != 0)
ACELIB_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"),
ACE_TEXT ("ACE_Mutex::ACE_Mutex")));
}
ACE_Mutex::~ACE_Mutex (void)