diff options
author | Nay <dnpd.dd@gmail.com> | 2012-09-17 23:21:01 +0100 |
---|---|---|
committer | Nay <dnpd.dd@gmail.com> | 2012-09-17 23:21:01 +0100 |
commit | 2e21fa6b925c4572d620248f1b149a5d652836b2 (patch) | |
tree | d0ff026bc848d7ee466c9b793f42fb9ec4f07f62 /dep/acelite/ace/Handle_Set.cpp | |
parent | 6ebc6b9a76d0a4576306d777b35ec1a37d3ec5da (diff) |
Core/Dependencies: Update ACE to v6.1.4 (Windows only)
Tested in multiple configurations
.diff with TC changes added
Diffstat (limited to 'dep/acelite/ace/Handle_Set.cpp')
-rw-r--r-- | dep/acelite/ace/Handle_Set.cpp | 53 |
1 files changed, 4 insertions, 49 deletions
diff --git a/dep/acelite/ace/Handle_Set.cpp b/dep/acelite/ace/Handle_Set.cpp index ba64fb3443f..4c9b6b56017 100644 --- a/dep/acelite/ace/Handle_Set.cpp +++ b/dep/acelite/ace/Handle_Set.cpp @@ -1,5 +1,5 @@ // Handle_Set.cpp -// $Id: Handle_Set.cpp 91286 2010-08-05 09:04:31Z johnnyw $ +// $Id: Handle_Set.cpp 95761 2012-05-15 18:23:04Z johnnyw $ #include "ace/Handle_Set.h" @@ -9,8 +9,6 @@ #include "ace/OS_NS_string.h" - - ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_ALLOC_HOOK_DEFINE(ACE_Handle_Set) @@ -24,12 +22,12 @@ ACE_ALLOC_HOOK_DEFINE(ACE_Handle_Set) # define ACE_MSB_MASK (~((fd_mask) 1 << (NFDBITS - 1))) #endif /* ! ACE_WIN32 */ -#if defined (linux) && __GLIBC__ > 1 && __GLIBC_MINOR__ >= 1 && !defined (_XOPEN_SOURCE) +#if defined (ACE_LINUX) && __GLIBC__ > 1 && __GLIBC_MINOR__ >= 1 && !defined (_XOPEN_SOURCE) // XPG4.2 requires the fds_bits member name, so it is not enabled by // default on Linux/glibc-2.1.x systems. Instead use "__fds_bits." // Ugly, but "what are you going to do?" 8-) #define fds_bits __fds_bits -#endif /* linux && __GLIBC__ > 1 && __GLIBC_MINOR__ >= 1 && !_XOPEN_SOURCE */ +#endif /* ACE_LINUX && __GLIBC__ > 1 && __GLIBC_MINOR__ >= 1 && !_XOPEN_SOURCE */ void ACE_Handle_Set::dump (void) const @@ -226,24 +224,11 @@ ACE_Handle_Set::set_max (ACE_HANDLE current_max) maskp[i] == 0; i--) continue; -#if defined (ACE_TANDEM_NSK_BIT_ORDER) - // bits are in reverse order, MSB (sign bit) = bit 0. - this->max_handle_ = ACE_MULT_BY_WORDSIZE (i); - for (fd_mask val = maskp[i]; - (val & ACE_MSB_MASK) != 0; - val = (val << 1)) - ++this->max_handle_; -#elif 1 /* !defined(ACE_HAS_BIG_FD_SET) */ this->max_handle_ = ACE_MULT_BY_WORDSIZE (i); for (fd_mask val = maskp[i]; (val & ~1) != 0; // This obscure code is needed since "bit 0" is in location 1... val = (val >> 1) & ACE_MSB_MASK) ++this->max_handle_; -#else - register u_long val = this->mask_.fds_bits[i]; - this->max_handle_ = ACE_MULT_BY_WORDSIZE (i) - + ACE_Handle_Set::bitpos(val & ~(val - 1)); -#endif /* 1 */ } // Do some sanity checking... @@ -312,12 +297,7 @@ ACE_Handle_Set_Iterator::operator () (void) // Increment the iterator and advance to the next bit in this // word. this->handle_index_++; -#if defined (ACE_TANDEM_NSK_BIT_ORDER) - // bits are in reverse order, MSB (sign bit) = bit 0. - this->word_val_ = (this->word_val_ << 1); -# else this->word_val_ = (this->word_val_ >> 1) & ACE_MSB_MASK; -# endif /* ACE_TANDEM_NSK_BIT_ORDER */ // If we've examined all the bits in this word, we'll go onto // the next word. @@ -353,19 +333,10 @@ ACE_Handle_Set_Iterator::operator () (void) // bit enabled, keeping track of which <handle_index> this // represents (this information is used by subsequent calls to // <operator()>). - -#if defined (ACE_TANDEM_NSK_BIT_ORDER) - // bits are in reverse order, MSB (sign bit) = bit 0. - for (; - this->word_val_ > 0; - this->word_val_ = (this->word_val_ << 1)) - this->handle_index_++; -# else for (; ACE_BIT_DISABLED (this->word_val_, 1); this->handle_index_++) this->word_val_ = (this->word_val_ >> 1) & ACE_MSB_MASK; -# endif /* ACE_TANDEM_NSK_BIT_ORDER */ return result; } @@ -435,6 +406,7 @@ ACE_Handle_Set_Iterator::ACE_Handle_Set_Iterator (const ACE_Handle_Set &hs) handle_index_ (0), word_num_ (-1) #elif defined (ACE_HAS_BIG_FD_SET) + handle_index_ (0), oldlsb_ (0), word_max_ (hs.max_handle_ == ACE_INVALID_HANDLE ? 0 @@ -466,19 +438,11 @@ ACE_Handle_Set_Iterator::ACE_Handle_Set_Iterator (const ACE_Handle_Set &hs) // Loop until we get <word_val_> to have its least significant bit // enabled, keeping track of which <handle_index> this represents // (this information is used by <operator()>). -#if defined (ACE_TANDEM_NSK_BIT_ORDER) - // bits are in reverse order, MSB (sign bit) = bit 0. - for (this->word_val_ = maskp[this->word_num_]; - this->word_val_ > 0; - this->word_val_ = (this->word_val_ << 1)) - this->handle_index_++; -# else for (this->word_val_ = maskp[this->word_num_]; ACE_BIT_DISABLED (this->word_val_, 1) && this->handle_index_ < maxhandlep1; this->handle_index_++) this->word_val_ = (this->word_val_ >> 1) & ACE_MSB_MASK; -# endif /* ACE_TANDEM_NSK_BIT_ORDER */ #elif !defined (ACE_WIN32) && defined (ACE_HAS_BIG_FD_SET) if (this->word_max_==0) { @@ -494,7 +458,6 @@ ACE_Handle_Set_Iterator::ACE_Handle_Set_Iterator (const ACE_Handle_Set &hs) #endif /* !ACE_WIN32 && !ACE_HAS_BIG_FD_SET */ } - void ACE_Handle_Set_Iterator::reset_state (void) { @@ -534,19 +497,11 @@ ACE_Handle_Set_Iterator::reset_state (void) // Loop until we get <word_val_> to have its least significant bit // enabled, keeping track of which <handle_index> this represents // (this information is used by <operator()>). -#if defined (ACE_TANDEM_NSK_BIT_ORDER) - // bits are in reverse order, MSB (sign bit) = bit 0. - for (this->word_val_ = maskp[this->word_num_]; - this->word_val_ > 0; - this->word_val_ = (this->word_val_ << 1)) - this->handle_index_++; -# else for (this->word_val_ = maskp[this->word_num_]; ACE_BIT_DISABLED (this->word_val_, 1) && this->handle_index_ < maxhandlep1; this->handle_index_++) this->word_val_ = (this->word_val_ >> 1) & ACE_MSB_MASK; -# endif /* ACE_TANDEM_NSK_BIT_ORDER */ #elif !defined (ACE_WIN32) && defined (ACE_HAS_BIG_FD_SET) if (this->word_max_==0) { |