2 #include "ace/Reactor_Impl.h"
4 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
6 // Run the event loop until the <ACE_Reactor::handle_events> method
7 // returns -1 or the <end_event_loop> method is invoked.
9 ACE_Reactor::run_event_loop ()
11 ACE_TRACE ("ACE_Reactor::run_event_loop");
12 ACE_Reactor *r = ACE_Reactor::instance ();
17 return r->run_reactor_event_loop (ACE_Reactor::check_reconfiguration);
20 // Run the event loop until the <ACE_Reactor::handle_events>
21 // method returns -1, the <end_event_loop> method
22 // is invoked, or the <ACE_Time_Value> expires.
25 ACE_Reactor::run_event_loop (ACE_Time_Value &tv)
27 ACE_TRACE ("ACE_Reactor::run_event_loop");
28 ACE_Reactor *r = ACE_Reactor::instance ();
33 return r->run_reactor_event_loop
34 (tv, ACE_Reactor::check_reconfiguration);
37 // Run the event loop until the <ACE_Reactor::alertable_handle_events> method
38 // returns -1 or the <end_event_loop> method is invoked.
41 ACE_Reactor::run_alertable_event_loop ()
43 ACE_TRACE ("ACE_Reactor::run_alertable_event_loop");
44 ACE_Reactor *r = ACE_Reactor::instance ();
49 return r->run_alertable_reactor_event_loop (ACE_Reactor::check_reconfiguration);
52 // Run the event loop until the <ACE_Reactor::alertable_handle_events>
53 // method returns -1, the <end_event_loop> method
54 // is invoked, or the <ACE_Time_Value> expires.
57 ACE_Reactor::run_alertable_event_loop (ACE_Time_Value &tv)
59 ACE_TRACE ("ACE_Reactor::run_alertable_event_loop");
60 ACE_Reactor *r = ACE_Reactor::instance ();
65 return r->run_alertable_reactor_event_loop
66 (tv, ACE_Reactor::check_reconfiguration);
70 ACE_Reactor::reset_event_loop ()
72 ACE_TRACE ("ACE_Reactor::reset_event_loop");
74 ACE_Reactor::instance ()->reset_reactor_event_loop ();
78 ACE_Reactor::end_event_loop ()
80 ACE_TRACE ("ACE_Reactor::end_event_loop");
81 ACE_Reactor::instance ()->end_reactor_event_loop ();
87 ACE_Reactor::event_loop_done ()
89 ACE_TRACE ("ACE_Reactor::event_loop_done");
90 return ACE_Reactor::instance ()->reactor_event_loop_done ();
94 ACE_Reactor::end_reactor_event_loop ()
96 ACE_TRACE ("ACE_Reactor::end_reactor_event_loop");
98 this->implementation_->deactivate (1);
104 ACE_Reactor::reset_reactor_event_loop ()
106 ACE_TRACE ("ACE_Reactor::reset_reactor_event_loop");
108 this->implementation_->deactivate (0);
112 ACE_Reactor::resumable_handler ()
114 return this->implementation ()->resumable_handler ();
117 ACE_INLINE ACE_Reactor_Impl *
118 ACE_Reactor::implementation () const
120 return this->implementation_;
124 ACE_Reactor::implementation (ACE_Reactor_Impl *impl)
126 this->implementation_ = impl;
130 ACE_Reactor::current_info (ACE_HANDLE handle, size_t &size)
132 return this->implementation ()->current_info (handle, size);
136 ACE_Reactor::open (size_t size,
138 ACE_Sig_Handler *signal_handler,
139 ACE_Timer_Queue *timer_queue)
141 return this->implementation ()->open (size,
147 ACE_Reactor::set_sig_handler (ACE_Sig_Handler *signal_handler)
149 return this->implementation ()->set_sig_handler (signal_handler);
153 ACE_Reactor::timer_queue (ACE_Timer_Queue *tq)
155 return this->implementation ()->timer_queue (tq);
158 ACE_INLINE ACE_Timer_Queue *
159 ACE_Reactor::timer_queue () const
161 return this->implementation ()->timer_queue ();
165 ACE_Reactor::close ()
167 return this->implementation ()->close ();
171 ACE_Reactor::work_pending (const ACE_Time_Value &max_wait_time)
173 return this->implementation ()->work_pending (max_wait_time);
177 ACE_Reactor::handle_events (ACE_Time_Value *max_wait_time)
179 return this->implementation ()->handle_events (max_wait_time);
183 ACE_Reactor::alertable_handle_events (ACE_Time_Value *max_wait_time)
185 return this->implementation ()->alertable_handle_events (max_wait_time);
189 ACE_Reactor::handle_events (ACE_Time_Value &max_wait_time)
191 return this->implementation ()->handle_events (max_wait_time);
195 ACE_Reactor::alertable_handle_events (ACE_Time_Value &max_wait_time)
197 return this->implementation ()->alertable_handle_events (max_wait_time);
201 ACE_Reactor::register_handler (int signum,
202 ACE_Event_Handler *new_sh,
203 ACE_Sig_Action *new_disp,
204 ACE_Event_Handler **old_sh,
205 ACE_Sig_Action *old_disp)
207 return this->implementation ()->register_handler (signum,
215 ACE_Reactor::register_handler (const ACE_Sig_Set &sigset,
216 ACE_Event_Handler *new_sh,
217 ACE_Sig_Action *new_disp)
219 return this->implementation ()->register_handler (sigset,
225 ACE_Reactor::remove_handler (ACE_Event_Handler *event_handler,
226 ACE_Reactor_Mask mask)
228 return this->implementation ()->remove_handler (event_handler, mask);
232 ACE_Reactor::remove_handler (ACE_HANDLE handle,
233 ACE_Reactor_Mask mask)
235 return this->implementation ()->remove_handler (handle, mask);
239 ACE_Reactor::remove_handler (const ACE_Handle_Set &handle_set,
240 ACE_Reactor_Mask mask)
242 return this->implementation ()->remove_handler (handle_set, mask);
246 ACE_Reactor::remove_handler (int signum,
247 ACE_Sig_Action *new_disp,
248 ACE_Sig_Action *old_disp,
251 return this->implementation ()->remove_handler (signum,
258 ACE_Reactor::remove_handler (const ACE_Sig_Set &sigset)
260 return this->implementation ()->remove_handler (sigset);
264 ACE_Reactor::suspend_handler (ACE_Event_Handler *event_handler)
266 return this->implementation ()->suspend_handler (event_handler);
270 ACE_Reactor::suspend_handler (ACE_HANDLE handle)
272 return this->implementation ()->suspend_handler (handle);
276 ACE_Reactor::suspend_handler (const ACE_Handle_Set &handles)
278 return this->implementation ()->suspend_handler (handles);
282 ACE_Reactor::suspend_handlers ()
284 return this->implementation ()->suspend_handlers ();
288 ACE_Reactor::resume_handler (ACE_Event_Handler *event_handler)
290 return this->implementation ()->resume_handler (event_handler);
294 ACE_Reactor::resume_handler (ACE_HANDLE handle)
296 return this->implementation ()->resume_handler (handle);
300 ACE_Reactor::resume_handler (const ACE_Handle_Set &handles)
302 return this->implementation ()->resume_handler (handles);
306 ACE_Reactor::resume_handlers ()
308 return this->implementation ()->resume_handlers ();
312 ACE_Reactor::schedule_wakeup (ACE_HANDLE handle,
313 ACE_Reactor_Mask masks_to_be_added)
315 return implementation ()->schedule_wakeup (handle, masks_to_be_added);
319 ACE_Reactor::cancel_wakeup (ACE_Event_Handler *event_handler,
320 ACE_Reactor_Mask masks_to_be_cleared)
322 return this->implementation ()->cancel_wakeup (event_handler,
323 masks_to_be_cleared);
327 ACE_Reactor::cancel_wakeup (ACE_HANDLE handle,
328 ACE_Reactor_Mask masks_to_be_cleared)
330 return this->implementation ()->cancel_wakeup (handle,
331 masks_to_be_cleared);
335 ACE_Reactor::max_notify_iterations (int iterations)
337 this->implementation ()->max_notify_iterations (iterations);
341 ACE_Reactor::max_notify_iterations ()
343 return this->implementation ()->max_notify_iterations ();
347 ACE_Reactor::purge_pending_notifications (ACE_Event_Handler *eh,
348 ACE_Reactor_Mask mask)
350 return this->implementation ()->purge_pending_notifications (eh, mask);
353 ACE_INLINE ACE_Event_Handler *
354 ACE_Reactor::find_handler (ACE_HANDLE handle)
356 return this->implementation ()->find_handler (handle);
360 ACE_Reactor::handler (ACE_HANDLE handle,
361 ACE_Reactor_Mask mask,
362 ACE_Event_Handler **event_handler)
364 return this->implementation ()->handler (handle, mask, event_handler);
368 ACE_Reactor::handler (int signum,
369 ACE_Event_Handler **event_handler)
371 return this->implementation ()->handler (signum, event_handler);
375 ACE_Reactor::initialized ()
377 return this->implementation ()->initialized ();
380 ACE_INLINE ACE_Lock &
383 return this->implementation ()->lock ();
387 ACE_Reactor::wakeup_all_threads ()
389 this->implementation ()->wakeup_all_threads ();
393 ACE_Reactor::owner (ACE_thread_t new_owner, ACE_thread_t *old_owner)
395 return this->implementation ()->owner (new_owner, old_owner);
399 ACE_Reactor::owner (ACE_thread_t *owner)
401 return this->implementation ()->owner (owner);
405 ACE_Reactor::restart ()
407 return this->implementation ()->restart ();
411 ACE_Reactor::restart (bool r)
413 return this->implementation ()->restart (r);
417 ACE_Reactor::requeue_position (int position)
419 this->implementation ()->requeue_position (position);
423 ACE_Reactor::requeue_position ()
425 return this->implementation ()->requeue_position ();
429 ACE_Reactor::mask_ops (ACE_Event_Handler *event_handler,
430 ACE_Reactor_Mask mask,
433 return this->implementation ()->mask_ops (event_handler, mask, ops);
437 ACE_Reactor::mask_ops (ACE_HANDLE handle,
438 ACE_Reactor_Mask mask,
441 return this->implementation ()->mask_ops (handle, mask, ops);
445 ACE_Reactor::ready_ops (ACE_Event_Handler *event_handler,
446 ACE_Reactor_Mask mask,
449 return this->implementation ()->ready_ops (event_handler, mask, ops);
453 ACE_Reactor::ready_ops (ACE_HANDLE handle,
454 ACE_Reactor_Mask mask,
457 return this->implementation ()->ready_ops (handle, mask, ops);
461 ACE_Reactor::reactor_event_loop_done ()
463 ACE_TRACE ("ACE_Reactor::reactor_event_loop_done");
464 return this->implementation_->deactivated ();
468 ACE_Reactor::size () const
470 return this->implementation ()->size ();
474 ACE_Reactor::uses_event_associations ()
476 return this->implementation ()->uses_event_associations ();
480 ACE_Reactor::dump () const
482 #if defined (ACE_HAS_DUMP)
483 ACE_TRACE ("ACE_Reactor::dump");
485 implementation_->dump ();
486 #endif /* ACE_HAS_DUMP */
489 ACE_END_VERSIONED_NAMESPACE_DECL