00001
00002
00003
00004
00005 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00006
00007
00008
00009
00010
00011 ACE_INLINE
00012 ACE_EH_Dispatch_Info::ACE_EH_Dispatch_Info (void) :
00013 handle_ (ACE_INVALID_HANDLE),
00014 event_handler_ (0),
00015 mask_ (ACE_Event_Handler::NULL_MASK),
00016 callback_ (0),
00017 resume_flag_ (ACE_Event_Handler::ACE_REACTOR_RESUMES_HANDLER),
00018 reference_counting_required_ (false),
00019 dispatch_ (false)
00020 {
00021 }
00022
00023 ACE_INLINE void
00024 ACE_EH_Dispatch_Info::set (ACE_HANDLE handle,
00025 ACE_Event_Handler *event_handler,
00026 ACE_Reactor_Mask mask,
00027 ACE_EH_PTMF callback)
00028 {
00029 this->dispatch_ = true;
00030
00031 this->handle_ = handle;
00032 this->event_handler_ = event_handler;
00033 this->mask_ = mask;
00034 this->callback_ = callback;
00035 if (event_handler_)
00036 {
00037 this->resume_flag_ = event_handler->resume_handler ();
00038 this->reference_counting_required_ =
00039 (event_handler_->reference_counting_policy ().value () ==
00040 ACE_Event_Handler::Reference_Counting_Policy::ENABLED);
00041 }
00042 else
00043 this->dispatch_ = false;
00044 }
00045
00046 ACE_INLINE bool
00047 ACE_EH_Dispatch_Info::dispatch (void) const
00048 {
00049 return this->dispatch_;
00050 }
00051
00052
00053
00054
00055
00056 ACE_INLINE
00057 ACE_TP_Token_Guard::ACE_TP_Token_Guard (ACE_Select_Reactor_Token &token)
00058
00059 : token_ (token),
00060 owner_ (false)
00061 {
00062 }
00063
00064 ACE_INLINE
00065 ACE_TP_Token_Guard::~ACE_TP_Token_Guard (void)
00066 {
00067 if (this->owner_)
00068 {
00069 ACE_MT (this->token_.release ());
00070 this->owner_ = false;
00071 }
00072 }
00073
00074 ACE_INLINE void
00075 ACE_TP_Token_Guard::release_token (void)
00076 {
00077 if (this->owner_)
00078 {
00079 ACE_MT (this->token_.release ());
00080
00081
00082 this->owner_ = false;
00083 }
00084 }
00085
00086 ACE_INLINE bool
00087 ACE_TP_Token_Guard::is_owner (void)
00088 {
00089 return this->owner_;
00090 }
00091
00092
00093
00094
00095
00096
00097 ACE_INLINE void
00098 ACE_TP_Reactor::no_op_sleep_hook (void *)
00099 {
00100 }
00101
00102 ACE_INLINE void
00103 ACE_TP_Reactor::clear_handle_read_set (ACE_HANDLE handle)
00104 {
00105 this->ready_set_.wr_mask_.clr_bit (handle);
00106 this->ready_set_.ex_mask_.clr_bit (handle);
00107 this->ready_set_.rd_mask_.clr_bit (handle);
00108 }
00109
00110 ACE_INLINE void
00111 ACE_TP_Reactor::clear_dispatch_mask (ACE_HANDLE ,
00112 ACE_Reactor_Mask )
00113 {
00114 this->ready_set_.rd_mask_.reset ();
00115 this->ready_set_.wr_mask_.reset ();
00116 this->ready_set_.ex_mask_.reset ();
00117 }
00118
00119 ACE_END_VERSIONED_NAMESPACE_DECL