diff options
author | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-02-26 00:48:54 +0000 |
---|---|---|
committer | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-02-26 00:48:54 +0000 |
commit | 872cec930ccc788b1f2cf5c1fb7c327c0729e356 (patch) | |
tree | 07c8c1ffd82cdaf537786128b17266b743baa57d /ace/Select_Reactor_Base.cpp | |
parent | 568d39a7e2f18cf32b1946795f4425220dd4f6c8 (diff) | |
download | ATCD-872cec930ccc788b1f2cf5c1fb7c327c0729e356.tar.gz |
*** empty log message ***
Diffstat (limited to 'ace/Select_Reactor_Base.cpp')
-rw-r--r-- | ace/Select_Reactor_Base.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/ace/Select_Reactor_Base.cpp b/ace/Select_Reactor_Base.cpp index af3fc8f88d0..cd007b240e5 100644 --- a/ace/Select_Reactor_Base.cpp +++ b/ace/Select_Reactor_Base.cpp @@ -693,17 +693,21 @@ ACE_Select_Reactor_Impl::bit_ops (ACE_HANDLE handle, ACE_FDS_PTMF ptmf = &ACE_Handle_Set::set_bit; u_long omask = ACE_Event_Handler::NULL_MASK; + // Find the old reactor masks. This automatically does the work of + // the GET_MASK operation. + if (handle_set.rd_mask_.is_set (handle)) + ACE_SET_BITS (omask, ACE_Event_Handler::READ_MASK); + if (handle_set.wr_mask_.is_set (handle)) + ACE_SET_BITS (omask, ACE_Event_Handler::WRITE_MASK); + if (handle_set.ex_mask_.is_set (handle)) + ACE_SET_BITS (omask, ACE_Event_Handler::EXCEPT_MASK); + switch (ops) { case ACE_Reactor::GET_MASK: - if (handle_set.rd_mask_.is_set (handle)) - ACE_SET_BITS (omask, ACE_Event_Handler::READ_MASK); - if (handle_set.wr_mask_.is_set (handle)) - ACE_SET_BITS (omask, ACE_Event_Handler::WRITE_MASK); - if (handle_set.ex_mask_.is_set (handle)) - ACE_SET_BITS (omask, ACE_Event_Handler::EXCEPT_MASK); + // The work for this operation is done in all cases at the + // begining of the function. break; - case ACE_Reactor::CLR_MASK: ptmf = &ACE_Handle_Set::clr_bit; /* FALLTHRU */ @@ -725,7 +729,6 @@ ACE_Select_Reactor_Impl::bit_ops (ACE_HANDLE handle, || ACE_BIT_ENABLED (mask, ACE_Event_Handler::CONNECT_MASK)) { (handle_set.rd_mask_.*ptmf) (handle); - ACE_SET_BITS (omask, ACE_Event_Handler::READ_MASK); } else if (ops == ACE_Reactor::SET_MASK) handle_set.rd_mask_.clr_bit (handle); @@ -737,7 +740,6 @@ ACE_Select_Reactor_Impl::bit_ops (ACE_HANDLE handle, ACE_Event_Handler::CONNECT_MASK)) { (handle_set.wr_mask_.*ptmf) (handle); - ACE_SET_BITS (omask, ACE_Event_Handler::WRITE_MASK); } else if (ops == ACE_Reactor::SET_MASK) handle_set.wr_mask_.clr_bit (handle); @@ -751,7 +753,6 @@ ACE_Select_Reactor_Impl::bit_ops (ACE_HANDLE handle, ) { (handle_set.ex_mask_.*ptmf) (handle); - ACE_SET_BITS (omask, ACE_Event_Handler::EXCEPT_MASK); } else if (ops == ACE_Reactor::SET_MASK) handle_set.ex_mask_.clr_bit (handle); |