2 #include "ace/Reactor_Impl.h"
5 * Hook to specialize the Reactor with the concrete implementation
6 * known at compile time.
8 //@@ REACTOR_SPL_INCLUDE_FORWARD_DECL_ADD_HOOK
10 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
12 // Run the event loop until the <ACE_Reactor::handle_events> method
13 // returns -1 or the <end_event_loop> method is invoked.
15 ACE_Reactor::run_event_loop (void)
17 ACE_TRACE ("ACE_Reactor::run_event_loop");
18 ACE_Reactor *r = ACE_Reactor::instance ();
23 return r->run_reactor_event_loop (ACE_Reactor::check_reconfiguration);
26 // Run the event loop until the <ACE_Reactor::handle_events>
27 // method returns -1, the <end_event_loop> method
28 // is invoked, or the <ACE_Time_Value> expires.
31 ACE_Reactor::run_event_loop (ACE_Time_Value &tv)
33 ACE_TRACE ("ACE_Reactor::run_event_loop");
34 ACE_Reactor *r = ACE_Reactor::instance ();
39 return r->run_reactor_event_loop
40 (tv, ACE_Reactor::check_reconfiguration);
43 // Run the event loop until the <ACE_Reactor::alertable_handle_events> method
44 // returns -1 or the <end_event_loop> method is invoked.
47 ACE_Reactor::run_alertable_event_loop (void)
49 ACE_TRACE ("ACE_Reactor::run_alertable_event_loop");
50 ACE_Reactor *r = ACE_Reactor::instance ();
55 return r->run_alertable_reactor_event_loop (ACE_Reactor::check_reconfiguration);
58 // Run the event loop until the <ACE_Reactor::alertable_handle_events>
59 // method returns -1, the <end_event_loop> method
60 // is invoked, or the <ACE_Time_Value> expires.
63 ACE_Reactor::run_alertable_event_loop (ACE_Time_Value &tv)
65 ACE_TRACE ("ACE_Reactor::run_alertable_event_loop");
66 ACE_Reactor *r = ACE_Reactor::instance ();
71 return r->run_alertable_reactor_event_loop
72 (tv, ACE_Reactor::check_reconfiguration);
76 ACE_Reactor::reset_event_loop (void)
78 ACE_TRACE ("ACE_Reactor::reset_event_loop");
80 ACE_Reactor::instance ()->reset_reactor_event_loop ();
84 ACE_Reactor::end_event_loop (void)
86 ACE_TRACE ("ACE_Reactor::end_event_loop");
87 ACE_Reactor::instance ()->end_reactor_event_loop ();
93 ACE_Reactor::event_loop_done (void)
95 ACE_TRACE ("ACE_Reactor::event_loop_done");
96 return ACE_Reactor::instance ()->reactor_event_loop_done ();
100 ACE_Reactor::end_reactor_event_loop (void)
102 ACE_TRACE ("ACE_Reactor::end_reactor_event_loop");
104 this->implementation_->deactivate (1);
110 ACE_Reactor::reset_reactor_event_loop (void)
112 ACE_TRACE ("ACE_Reactor::reset_reactor_event_loop");
114 this->implementation_->deactivate (0);
118 ACE_Reactor::resumable_handler (void)
120 return this->implementation ()->resumable_handler ();
123 ACE_INLINE ACE_Reactor_Impl *
124 ACE_Reactor::implementation (void) const
126 return this->implementation_;
130 ACE_Reactor::implementation (ACE_Reactor_Impl *impl)
132 this->implementation_ = impl;
136 ACE_Reactor::current_info (ACE_HANDLE handle, size_t &size)
138 return this->implementation ()->current_info (handle, size);
142 ACE_Reactor::open (size_t size,
144 ACE_Sig_Handler *signal_handler,
145 ACE_Timer_Queue *timer_queue)
147 return this->implementation ()->open (size,
153 ACE_Reactor::set_sig_handler (ACE_Sig_Handler *signal_handler)
155 return this->implementation ()->set_sig_handler (signal_handler);
159 ACE_Reactor::timer_queue (ACE_Timer_Queue *tq)
161 return this->implementation ()->timer_queue (tq);
164 ACE_INLINE ACE_Timer_Queue *
165 ACE_Reactor::timer_queue (void) const
167 return this->implementation ()->timer_queue ();
171 ACE_Reactor::close (void)
173 return this->implementation ()->close ();
177 ACE_Reactor::work_pending (const ACE_Time_Value &max_wait_time)
179 return this->implementation ()->work_pending (max_wait_time);
183 ACE_Reactor::handle_events (ACE_Time_Value *max_wait_time)
185 return this->implementation ()->handle_events (max_wait_time);
189 ACE_Reactor::alertable_handle_events (ACE_Time_Value *max_wait_time)
191 return this->implementation ()->alertable_handle_events (max_wait_time);
195 ACE_Reactor::handle_events (ACE_Time_Value &max_wait_time)
197 return this->implementation ()->handle_events (max_wait_time);
201 ACE_Reactor::alertable_handle_events (ACE_Time_Value &max_wait_time)
203 return this->implementation ()->alertable_handle_events (max_wait_time);
207 ACE_Reactor::register_handler (int signum,
208 ACE_Event_Handler *new_sh,
209 ACE_Sig_Action *new_disp,
210 ACE_Event_Handler **old_sh,
211 ACE_Sig_Action *old_disp)
213 return this->implementation ()->register_handler (signum,
221 ACE_Reactor::register_handler (const ACE_Sig_Set &sigset,
222 ACE_Event_Handler *new_sh,
223 ACE_Sig_Action *new_disp)
225 return this->implementation ()->register_handler (sigset,
231 ACE_Reactor::remove_handler (ACE_Event_Handler *event_handler,
232 ACE_Reactor_Mask mask)
234 return this->implementation ()->remove_handler (event_handler, mask);
238 ACE_Reactor::remove_handler (ACE_HANDLE handle,
239 ACE_Reactor_Mask mask)
241 return this->implementation ()->remove_handler (handle, mask);
245 ACE_Reactor::remove_handler (const ACE_Handle_Set &handle_set,
246 ACE_Reactor_Mask mask)
248 return this->implementation ()->remove_handler (handle_set, mask);
252 ACE_Reactor::remove_handler (int signum,
253 ACE_Sig_Action *new_disp,
254 ACE_Sig_Action *old_disp,
257 return this->implementation ()->remove_handler (signum,
264 ACE_Reactor::remove_handler (const ACE_Sig_Set &sigset)
266 return this->implementation ()->remove_handler (sigset);
270 ACE_Reactor::suspend_handler (ACE_Event_Handler *event_handler)
272 return this->implementation ()->suspend_handler (event_handler);
276 ACE_Reactor::suspend_handler (ACE_HANDLE handle)
278 return this->implementation ()->suspend_handler (handle);
282 ACE_Reactor::suspend_handler (const ACE_Handle_Set &handles)
284 return this->implementation ()->suspend_handler (handles);
288 ACE_Reactor::suspend_handlers (void)
290 return this->implementation ()->suspend_handlers ();
294 ACE_Reactor::resume_handler (ACE_Event_Handler *event_handler)
296 return this->implementation ()->resume_handler (event_handler);
300 ACE_Reactor::resume_handler (ACE_HANDLE handle)
302 return this->implementation ()->resume_handler (handle);
306 ACE_Reactor::resume_handler (const ACE_Handle_Set &handles)
308 return this->implementation ()->resume_handler (handles);
312 ACE_Reactor::resume_handlers (void)
314 return this->implementation ()->resume_handlers ();
318 ACE_Reactor::schedule_wakeup (ACE_HANDLE handle,
319 ACE_Reactor_Mask masks_to_be_added)
321 return implementation ()->schedule_wakeup (handle, masks_to_be_added);
325 ACE_Reactor::cancel_wakeup (ACE_Event_Handler *event_handler,
326 ACE_Reactor_Mask masks_to_be_cleared)
328 return this->implementation ()->cancel_wakeup (event_handler,
329 masks_to_be_cleared);
333 ACE_Reactor::cancel_wakeup (ACE_HANDLE handle,
334 ACE_Reactor_Mask masks_to_be_cleared)
336 return this->implementation ()->cancel_wakeup (handle,
337 masks_to_be_cleared);
341 ACE_Reactor::max_notify_iterations (int iterations)
343 this->implementation ()->max_notify_iterations (iterations);
347 ACE_Reactor::max_notify_iterations (void)
349 return this->implementation ()->max_notify_iterations ();
353 ACE_Reactor::purge_pending_notifications (ACE_Event_Handler *eh,
354 ACE_Reactor_Mask mask)
356 return this->implementation ()->purge_pending_notifications (eh, mask);
359 ACE_INLINE ACE_Event_Handler *
360 ACE_Reactor::find_handler (ACE_HANDLE handle)
362 return this->implementation ()->find_handler (handle);
366 ACE_Reactor::handler (ACE_HANDLE handle,
367 ACE_Reactor_Mask mask,
368 ACE_Event_Handler **event_handler)
370 return this->implementation ()->handler (handle, mask, event_handler);
374 ACE_Reactor::handler (int signum,
375 ACE_Event_Handler **event_handler)
377 return this->implementation ()->handler (signum, event_handler);
381 ACE_Reactor::initialized (void)
383 return this->implementation ()->initialized ();
386 ACE_INLINE ACE_Lock &
387 ACE_Reactor::lock (void)
389 return this->implementation ()->lock ();
393 ACE_Reactor::wakeup_all_threads (void)
395 this->implementation ()->wakeup_all_threads ();
399 ACE_Reactor::owner (ACE_thread_t new_owner, ACE_thread_t *old_owner)
401 return this->implementation ()->owner (new_owner, old_owner);
405 ACE_Reactor::owner (ACE_thread_t *owner)
407 return this->implementation ()->owner (owner);
411 ACE_Reactor::restart (void)
413 return this->implementation ()->restart ();
417 ACE_Reactor::restart (bool r)
419 return this->implementation ()->restart (r);
423 ACE_Reactor::requeue_position (int position)
425 this->implementation ()->requeue_position (position);
429 ACE_Reactor::requeue_position (void)
431 return this->implementation ()->requeue_position ();
435 ACE_Reactor::mask_ops (ACE_Event_Handler *event_handler,
436 ACE_Reactor_Mask mask,
439 return this->implementation ()->mask_ops (event_handler, mask, ops);
443 ACE_Reactor::mask_ops (ACE_HANDLE handle,
444 ACE_Reactor_Mask mask,
447 return this->implementation ()->mask_ops (handle, mask, ops);
451 ACE_Reactor::ready_ops (ACE_Event_Handler *event_handler,
452 ACE_Reactor_Mask mask,
455 return this->implementation ()->ready_ops (event_handler, mask, ops);
459 ACE_Reactor::ready_ops (ACE_HANDLE handle,
460 ACE_Reactor_Mask mask,
463 return this->implementation ()->ready_ops (handle, mask, ops);
467 ACE_Reactor::reactor_event_loop_done (void)
469 ACE_TRACE ("ACE_Reactor::reactor_event_loop_done");
470 return this->implementation_->deactivated ();
474 ACE_Reactor::size (void) const
476 return this->implementation ()->size ();
480 ACE_Reactor::uses_event_associations (void)
482 return this->implementation ()->uses_event_associations ();
486 ACE_Reactor::dump (void) const
488 #if defined (ACE_HAS_DUMP)
489 ACE_TRACE ("ACE_Reactor::dump");
491 implementation_->dump ();
492 #endif /* ACE_HAS_DUMP */
495 ACE_END_VERSIONED_NAMESPACE_DECL