2 #include "ace/Log_Category.h"
4 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
7 ACE_Dev_Poll_Reactor::Event_Tuple::Event_Tuple (ACE_Event_Handler *eh,
13 suspended (is_suspended),
14 controlled (is_controlled)
18 // ---------------------------------------------------------------------
21 ACE_Dev_Poll_Reactor::Handler_Repository::size (void) const
23 ACE_TRACE ("ACE_Dev_Poll_Reactor::Handler_Repository::size");
29 ACE_Dev_Poll_Reactor::Handler_Repository::max_size (void) const
31 ACE_TRACE ("ACE_Dev_Poll_Reactor::Handler_Repository::max_size");
33 return this->max_size_;
36 // -----------------------------------------------------------------
39 ACE_Dev_Poll_Handler_Guard::ACE_Dev_Poll_Handler_Guard
40 (ACE_Event_Handler *eh,
49 eh->reference_counting_policy ().value () ==
50 ACE_Event_Handler::Reference_Counting_Policy::ENABLED;
52 if (do_incr && this->refcounted_)
57 ACE_Dev_Poll_Handler_Guard::~ACE_Dev_Poll_Handler_Guard (void)
59 if (this->refcounted_ && this->eh_ != 0)
60 this->eh_->remove_reference ();
64 ACE_Dev_Poll_Handler_Guard::release (void)
69 // ---------------------------------------------------------------------
72 ACE_Dev_Poll_Reactor::upcall (ACE_Event_Handler *event_handler,
73 int (ACE_Event_Handler::*callback)(ACE_HANDLE),
76 // If the handler returns positive value (requesting a reactor
77 // callback) just call back as many times as the handler requests
78 // it. The handler is suspended internally and other threads are off
79 // handling other things.
84 status = (event_handler->*callback) (handle);
86 while (status > 0 && event_handler != this->notify_handler_);
92 /************************************************************************/
93 // Methods for ACE_Dev_Poll_Reactor::Token_Guard
94 /************************************************************************/
97 ACE_Dev_Poll_Reactor::Token_Guard::Token_Guard (ACE_Dev_Poll_Reactor_Token &token)
105 ACE_Dev_Poll_Reactor::Token_Guard::~Token_Guard (void)
109 ACE_MT (this->token_.release ());
110 this->owner_ = false;
115 ACE_Dev_Poll_Reactor::Token_Guard::release_token (void)
119 ACE_MT (this->token_.release ());
121 // We are not the owner anymore..
122 this->owner_ = false;
127 ACE_Dev_Poll_Reactor::Token_Guard::is_owner (void)
132 ACE_END_VERSIONED_NAMESPACE_DECL