mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19:37:03 +00:00
Some missing from merge.
Signed-off-by: Salja <salja2012@hotmail.de>
This commit is contained in:
parent
ec939a5bce
commit
f4be15a7af
1895 changed files with 160408 additions and 53601 deletions
|
|
@ -1,3 +1,5 @@
|
|||
// $Id: Task.cpp 95761 2012-05-15 18:23:04Z johnnyw $
|
||||
|
||||
#include "ace/Task.h"
|
||||
#include "ace/Module.h"
|
||||
|
||||
|
|
@ -5,7 +7,6 @@
|
|||
#include "ace/Task.inl"
|
||||
#endif /* __ACE_INLINE__ */
|
||||
|
||||
#include "ace/OS_NS_string.h"
|
||||
|
||||
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
|
||||
|
||||
|
|
@ -14,13 +15,8 @@ ACE_Task_Base::ACE_Task_Base (ACE_Thread_Manager *thr_man)
|
|||
thr_mgr_ (thr_man),
|
||||
flags_ (0),
|
||||
grp_id_ (-1)
|
||||
#if !(defined (ACE_TANDEM_T1248_PTHREADS) || defined (ACE_THREAD_T_IS_A_STRUCT))
|
||||
,last_thread_id_ (0)
|
||||
#endif /* ! ACE_TANDEM_T1248_PTHREADS || ACE_THREAD_T_IS_A_STRUCT */
|
||||
{
|
||||
#if defined (ACE_TANDEM_T1248_PTHREADS) || defined (ACE_THREAD_T_IS_A_STRUCT)
|
||||
ACE_OS::memset( &this->last_thread_id_, '\0', sizeof( this->last_thread_id_ ));
|
||||
#endif /* ACE_TANDEM_T1248_PTHREADS || ACE_THREAD_T_IS_A_STRUCT */
|
||||
}
|
||||
|
||||
ACE_Task_Base::~ACE_Task_Base (void)
|
||||
|
|
@ -131,14 +127,10 @@ ACE_Task_Base::activate (long flags,
|
|||
return 1; // Already active.
|
||||
else
|
||||
{
|
||||
if ((this->thr_count_ > 0 || grp_id == -1) &&
|
||||
this->grp_id_ != -1)
|
||||
if (this->thr_count_ > 0 && this->grp_id_ != -1)
|
||||
// If we're joining an existing group of threads then make
|
||||
// sure to (re)use its group id.
|
||||
// sure to use its group id.
|
||||
grp_id = this->grp_id_;
|
||||
else if (grp_id != -1)
|
||||
// make sure to reset the cached grp_id
|
||||
this->grp_id_ = -1;
|
||||
this->thr_count_ += n_threads;
|
||||
}
|
||||
|
||||
|
|
@ -192,11 +184,11 @@ ACE_Task_Base::activate (long flags,
|
|||
if (this->grp_id_ == -1)
|
||||
this->grp_id_ = grp_spawned;
|
||||
|
||||
#if defined(ACE_TANDEM_T1248_PTHREADS) || defined (ACE_THREAD_T_IS_A_STRUCT)
|
||||
#if defined(ACE_TANDEM_T1248_PTHREADS)
|
||||
ACE_OS::memcpy( &this->last_thread_id_, '\0', sizeof(this->last_thread_id_));
|
||||
#else
|
||||
this->last_thread_id_ = 0; // Reset to prevent inadvertant match on ID
|
||||
#endif /* ACE_TANDEM_T1248_PTHREADS || ACE_THREAD_T_IS_A_STRUCT */
|
||||
#endif /* defined (ACE_TANDEM_T1248_PTHREADS) */
|
||||
|
||||
return 0;
|
||||
|
||||
|
|
@ -264,10 +256,9 @@ ACE_Task_Base::svc_run (void *args)
|
|||
t->thr_mgr ()->at_exit (t, ACE_Task_Base::cleanup, 0);
|
||||
#endif /* ACE_HAS_SIG_C_FUNC */
|
||||
|
||||
ACE_THR_FUNC_RETURN status;
|
||||
// Call the Task's svc() hook method.
|
||||
int const svc_status = t->svc ();
|
||||
|
||||
ACE_THR_FUNC_RETURN status;
|
||||
#if defined (ACE_HAS_INTEGRAL_TYPE_THR_FUNC_RETURN)
|
||||
// Reinterpret case between integral types is not mentioned in the C++ spec
|
||||
status = static_cast<ACE_THR_FUNC_RETURN> (svc_status);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue