diff options
author | Steve Huston <shuston@riverace.com> | 2000-06-22 22:05:37 +0000 |
---|---|---|
committer | Steve Huston <shuston@riverace.com> | 2000-06-22 22:05:37 +0000 |
commit | f3cc1f3f4494e80f4d0e1667f20d1f04f1b5de0f (patch) | |
tree | 262ede6956fc590c094b5b974e9c3611370ca8b8 /ace/Handle_Set.cpp | |
parent | 0940992e5b6baa1be7c966d989a2dbf08a4f280c (diff) | |
download | ATCD-f3cc1f3f4494e80f4d0e1667f20d1f04f1b5de0f.tar.gz |
ChangeLogTag:Thu Jun 22 17:58:21 2000 Steve Huston <shuston@riverace.com>
Diffstat (limited to 'ace/Handle_Set.cpp')
-rw-r--r-- | ace/Handle_Set.cpp | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/ace/Handle_Set.cpp b/ace/Handle_Set.cpp index c38811219ac..0cbe70e82b4 100644 --- a/ace/Handle_Set.cpp +++ b/ace/Handle_Set.cpp @@ -214,7 +214,13 @@ ACE_Handle_Set::set_max (ACE_HANDLE current_max) i--) continue; -#if 1 /* !defined(ACE_HAS_BIG_FD_SET) */ +#if defined (ACE_PSOS) + 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... @@ -291,7 +297,11 @@ ACE_Handle_Set_Iterator::operator () (void) // Increment the iterator and advance to the next bit in this // word. this->handle_index_++; +# if defined (ACE_PSOS) + this->word_val_ = (this->word_val_ << 1); +# else this->word_val_ = (this->word_val_ >> 1) & ACE_MSB_MASK; +# endif /* ACE_PSOS */ // If we've examined all the bits in this word, we'll go onto // the next word. @@ -328,10 +338,17 @@ ACE_Handle_Set_Iterator::operator () (void) // represents (this information is used by subsequent calls to // <operator()>). +# if defined (ACE_PSOS) // 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_PSOS */ return result; } @@ -440,11 +457,18 @@ 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_PSOS) // 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_PSOS */ #elif !defined (ACE_WIN32) && defined (ACE_HAS_BIG_FD_SET) if (this->word_max_==0) { |