00001
00002
00003
00004
00005 #include "ace/Reactor_Impl.h"
00006
00007
00008
00009
00010
00011
00012
00013 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00014
00015
00016
00017 ACE_INLINE int
00018 ACE_Reactor::run_event_loop (void)
00019 {
00020 ACE_TRACE ("ACE_Reactor::run_event_loop");
00021 ACE_Reactor *r = ACE_Reactor::instance ();
00022
00023 if (r == 0)
00024 return -1;
00025
00026 return r->run_reactor_event_loop (ACE_Reactor::check_reconfiguration);
00027 }
00028
00029
00030
00031
00032
00033 ACE_INLINE int
00034 ACE_Reactor::run_event_loop (ACE_Time_Value &tv)
00035 {
00036 ACE_TRACE ("ACE_Reactor::run_event_loop");
00037 ACE_Reactor *r = ACE_Reactor::instance ();
00038
00039 if (r == 0)
00040 return -1;
00041
00042 return r->run_reactor_event_loop
00043 (tv, ACE_Reactor::check_reconfiguration);
00044 }
00045
00046
00047
00048
00049 ACE_INLINE int
00050 ACE_Reactor::run_alertable_event_loop (void)
00051 {
00052 ACE_TRACE ("ACE_Reactor::run_alertable_event_loop");
00053 ACE_Reactor *r = ACE_Reactor::instance ();
00054
00055 if (r == 0)
00056 return -1;
00057
00058 return r->run_alertable_reactor_event_loop (ACE_Reactor::check_reconfiguration);
00059 }
00060
00061
00062
00063
00064
00065 ACE_INLINE int
00066 ACE_Reactor::run_alertable_event_loop (ACE_Time_Value &tv)
00067 {
00068 ACE_TRACE ("ACE_Reactor::run_alertable_event_loop");
00069 ACE_Reactor *r = ACE_Reactor::instance ();
00070
00071 if (r == 0)
00072 return -1;
00073
00074 return r->run_alertable_reactor_event_loop
00075 (tv, ACE_Reactor::check_reconfiguration);
00076 }
00077
00078 ACE_INLINE void
00079 ACE_Reactor::reset_event_loop (void)
00080 {
00081 ACE_TRACE ("ACE_Reactor::reset_event_loop");
00082
00083 ACE_Reactor::instance ()->reset_reactor_event_loop ();
00084 }
00085
00086 ACE_INLINE int
00087 ACE_Reactor::end_event_loop (void)
00088 {
00089 ACE_TRACE ("ACE_Reactor::end_event_loop");
00090 ACE_Reactor::instance ()->end_reactor_event_loop ();
00091
00092 return 0;
00093 }
00094
00095 ACE_INLINE int
00096 ACE_Reactor::event_loop_done (void)
00097 {
00098 ACE_TRACE ("ACE_Reactor::event_loop_done");
00099 return ACE_Reactor::instance ()->reactor_event_loop_done ();
00100 }
00101
00102 ACE_INLINE int
00103 ACE_Reactor::end_reactor_event_loop (void)
00104 {
00105 ACE_TRACE ("ACE_Reactor::end_reactor_event_loop");
00106
00107 this->implementation_->deactivate (1);
00108
00109 return 0;
00110 }
00111
00112 ACE_INLINE void
00113 ACE_Reactor::reset_reactor_event_loop (void)
00114 {
00115 ACE_TRACE ("ACE_Reactor::reset_reactor_event_loop");
00116
00117 this->implementation_->deactivate (0);
00118 }
00119
00120 ACE_INLINE int
00121 ACE_Reactor::resumable_handler (void)
00122 {
00123 return this->implementation ()->resumable_handler ();
00124 }
00125
00126 ACE_INLINE ACE_Reactor_Impl *
00127 ACE_Reactor::implementation (void) const
00128 {
00129 return this->implementation_;
00130 }
00131
00132 ACE_INLINE void
00133 ACE_Reactor::implementation (ACE_Reactor_Impl *impl)
00134 {
00135 this->implementation_ = impl;
00136 }
00137
00138 ACE_INLINE int
00139 ACE_Reactor::current_info (ACE_HANDLE handle, size_t &size)
00140 {
00141 return this->implementation ()->current_info (handle, size);
00142 }
00143
00144 ACE_INLINE int
00145 ACE_Reactor::open (size_t size,
00146 bool restart,
00147 ACE_Sig_Handler *signal_handler,
00148 ACE_Timer_Queue *timer_queue)
00149 {
00150 return this->implementation ()->open (size,
00151 restart,
00152 signal_handler,
00153 timer_queue);
00154 }
00155 ACE_INLINE int
00156 ACE_Reactor::set_sig_handler (ACE_Sig_Handler *signal_handler)
00157 {
00158 return this->implementation ()->set_sig_handler (signal_handler);
00159 }
00160
00161 ACE_INLINE int
00162 ACE_Reactor::timer_queue (ACE_Timer_Queue *tq)
00163 {
00164 return this->implementation ()->timer_queue (tq);
00165 }
00166
00167 ACE_INLINE ACE_Timer_Queue *
00168 ACE_Reactor::timer_queue (void) const
00169 {
00170 return this->implementation ()->timer_queue ();
00171 }
00172
00173 ACE_INLINE int
00174 ACE_Reactor::close (void)
00175 {
00176 return this->implementation ()->close ();
00177 }
00178
00179 ACE_INLINE int
00180 ACE_Reactor::work_pending (const ACE_Time_Value &max_wait_time)
00181 {
00182 return this->implementation ()->work_pending (max_wait_time);
00183 }
00184
00185 ACE_INLINE int
00186 ACE_Reactor::handle_events (ACE_Time_Value *max_wait_time)
00187 {
00188 return this->implementation ()->handle_events (max_wait_time);
00189 }
00190
00191 ACE_INLINE int
00192 ACE_Reactor::alertable_handle_events (ACE_Time_Value *max_wait_time)
00193 {
00194 return this->implementation ()->alertable_handle_events (max_wait_time);
00195 }
00196
00197 ACE_INLINE int
00198 ACE_Reactor::handle_events (ACE_Time_Value &max_wait_time)
00199 {
00200 return this->implementation ()->handle_events (max_wait_time);
00201 }
00202
00203 ACE_INLINE int
00204 ACE_Reactor::alertable_handle_events (ACE_Time_Value &max_wait_time)
00205 {
00206 return this->implementation ()->alertable_handle_events (max_wait_time);
00207 }
00208
00209 ACE_INLINE int
00210 ACE_Reactor::register_handler (int signum,
00211 ACE_Event_Handler *new_sh,
00212 ACE_Sig_Action *new_disp,
00213 ACE_Event_Handler **old_sh,
00214 ACE_Sig_Action *old_disp)
00215 {
00216 return this->implementation ()->register_handler (signum,
00217 new_sh,
00218 new_disp,
00219 old_sh,
00220 old_disp);
00221 }
00222
00223 ACE_INLINE int
00224 ACE_Reactor::register_handler (const ACE_Sig_Set &sigset,
00225 ACE_Event_Handler *new_sh,
00226 ACE_Sig_Action *new_disp)
00227 {
00228 return this->implementation ()->register_handler (sigset,
00229 new_sh,
00230 new_disp);
00231 }
00232
00233 ACE_INLINE int
00234 ACE_Reactor::remove_handler (ACE_Event_Handler *event_handler,
00235 ACE_Reactor_Mask mask)
00236 {
00237 return this->implementation ()->remove_handler (event_handler, mask);
00238 }
00239
00240 ACE_INLINE int
00241 ACE_Reactor::remove_handler (ACE_HANDLE handle,
00242 ACE_Reactor_Mask mask)
00243 {
00244 return this->implementation ()->remove_handler (handle, mask);
00245 }
00246
00247 ACE_INLINE int
00248 ACE_Reactor::remove_handler (const ACE_Handle_Set &handle_set,
00249 ACE_Reactor_Mask mask)
00250 {
00251 return this->implementation ()->remove_handler (handle_set, mask);
00252 }
00253
00254 ACE_INLINE int
00255 ACE_Reactor::remove_handler (int signum,
00256 ACE_Sig_Action *new_disp,
00257 ACE_Sig_Action *old_disp,
00258 int sigkey)
00259 {
00260 return this->implementation ()->remove_handler (signum,
00261 new_disp,
00262 old_disp,
00263 sigkey);
00264 }
00265
00266 ACE_INLINE int
00267 ACE_Reactor::remove_handler (const ACE_Sig_Set &sigset)
00268 {
00269 return this->implementation ()->remove_handler (sigset);
00270 }
00271
00272 ACE_INLINE int
00273 ACE_Reactor::suspend_handler (ACE_Event_Handler *event_handler)
00274 {
00275 return this->implementation ()->suspend_handler (event_handler);
00276 }
00277
00278 ACE_INLINE int
00279 ACE_Reactor::suspend_handler (ACE_HANDLE handle)
00280 {
00281 return this->implementation ()->suspend_handler (handle);
00282 }
00283
00284 ACE_INLINE int
00285 ACE_Reactor::suspend_handler (const ACE_Handle_Set &handles)
00286 {
00287 return this->implementation ()->suspend_handler (handles);
00288 }
00289
00290 ACE_INLINE int
00291 ACE_Reactor::suspend_handlers (void)
00292 {
00293 return this->implementation ()->suspend_handlers ();
00294 }
00295
00296 ACE_INLINE int
00297 ACE_Reactor::resume_handler (ACE_Event_Handler *event_handler)
00298 {
00299 return this->implementation ()->resume_handler (event_handler);
00300 }
00301
00302 ACE_INLINE int
00303 ACE_Reactor::resume_handler (ACE_HANDLE handle)
00304 {
00305 return this->implementation ()->resume_handler (handle);
00306 }
00307
00308 ACE_INLINE int
00309 ACE_Reactor::resume_handler (const ACE_Handle_Set &handles)
00310 {
00311 return this->implementation ()->resume_handler (handles);
00312 }
00313
00314 ACE_INLINE int
00315 ACE_Reactor::resume_handlers (void)
00316 {
00317 return this->implementation ()->resume_handlers ();
00318 }
00319
00320 ACE_INLINE int
00321 ACE_Reactor::schedule_wakeup (ACE_HANDLE handle,
00322 ACE_Reactor_Mask masks_to_be_added)
00323 {
00324 return implementation ()->schedule_wakeup (handle, masks_to_be_added);
00325 }
00326
00327 ACE_INLINE int
00328 ACE_Reactor::cancel_wakeup (ACE_Event_Handler *event_handler,
00329 ACE_Reactor_Mask masks_to_be_cleared)
00330 {
00331 return this->implementation ()->cancel_wakeup (event_handler,
00332 masks_to_be_cleared);
00333 }
00334
00335 ACE_INLINE int
00336 ACE_Reactor::cancel_wakeup (ACE_HANDLE handle,
00337 ACE_Reactor_Mask masks_to_be_cleared)
00338 {
00339 return this->implementation ()->cancel_wakeup (handle,
00340 masks_to_be_cleared);
00341 }
00342
00343 ACE_INLINE void
00344 ACE_Reactor::max_notify_iterations (int iterations)
00345 {
00346 this->implementation ()->max_notify_iterations (iterations);
00347 }
00348
00349 ACE_INLINE int
00350 ACE_Reactor::max_notify_iterations (void)
00351 {
00352 return this->implementation ()->max_notify_iterations ();
00353 }
00354
00355 ACE_INLINE int
00356 ACE_Reactor::purge_pending_notifications (ACE_Event_Handler *eh,
00357 ACE_Reactor_Mask mask)
00358 {
00359 return this->implementation ()->purge_pending_notifications (eh, mask);
00360 }
00361
00362 ACE_INLINE ACE_Event_Handler *
00363 ACE_Reactor::find_handler (ACE_HANDLE handle)
00364 {
00365 return this->implementation ()->find_handler (handle);
00366 }
00367
00368 ACE_INLINE int
00369 ACE_Reactor::handler (ACE_HANDLE handle,
00370 ACE_Reactor_Mask mask,
00371 ACE_Event_Handler **event_handler)
00372 {
00373 return this->implementation ()->handler (handle, mask, event_handler);
00374 }
00375
00376 ACE_INLINE int
00377 ACE_Reactor::handler (int signum,
00378 ACE_Event_Handler **event_handler)
00379 {
00380 return this->implementation ()->handler (signum, event_handler);
00381 }
00382
00383 ACE_INLINE int
00384 ACE_Reactor::initialized (void)
00385 {
00386 return this->implementation ()->initialized ();
00387 }
00388
00389 ACE_INLINE ACE_Lock &
00390 ACE_Reactor::lock (void)
00391 {
00392 return this->implementation ()->lock ();
00393 }
00394
00395 ACE_INLINE void
00396 ACE_Reactor::wakeup_all_threads (void)
00397 {
00398 this->implementation ()->wakeup_all_threads ();
00399 }
00400
00401 ACE_INLINE int
00402 ACE_Reactor::owner (ACE_thread_t new_owner, ACE_thread_t *old_owner)
00403 {
00404 return this->implementation ()->owner (new_owner, old_owner);
00405 }
00406
00407 ACE_INLINE int
00408 ACE_Reactor::owner (ACE_thread_t *owner)
00409 {
00410 return this->implementation ()->owner (owner);
00411 }
00412
00413 ACE_INLINE bool
00414 ACE_Reactor::restart (void)
00415 {
00416 return this->implementation ()->restart ();
00417 }
00418
00419 ACE_INLINE bool
00420 ACE_Reactor::restart (bool r)
00421 {
00422 return this->implementation ()->restart (r);
00423 }
00424
00425 ACE_INLINE void
00426 ACE_Reactor::requeue_position (int position)
00427 {
00428 this->implementation ()->requeue_position (position);
00429 }
00430
00431 ACE_INLINE int
00432 ACE_Reactor::requeue_position (void)
00433 {
00434 return this->implementation ()->requeue_position ();
00435 }
00436
00437 ACE_INLINE int
00438 ACE_Reactor::mask_ops (ACE_Event_Handler *event_handler,
00439 ACE_Reactor_Mask mask,
00440 int ops)
00441 {
00442 return this->implementation ()->mask_ops (event_handler, mask, ops);
00443 }
00444
00445 ACE_INLINE int
00446 ACE_Reactor::mask_ops (ACE_HANDLE handle,
00447 ACE_Reactor_Mask mask,
00448 int ops)
00449 {
00450 return this->implementation ()->mask_ops (handle, mask, ops);
00451 }
00452
00453 ACE_INLINE int
00454 ACE_Reactor::ready_ops (ACE_Event_Handler *event_handler,
00455 ACE_Reactor_Mask mask,
00456 int ops)
00457 {
00458 return this->implementation ()->ready_ops (event_handler, mask, ops);
00459 }
00460
00461 ACE_INLINE int
00462 ACE_Reactor::ready_ops (ACE_HANDLE handle,
00463 ACE_Reactor_Mask mask,
00464 int ops)
00465 {
00466 return this->implementation ()->ready_ops (handle, mask, ops);
00467 }
00468
00469 ACE_INLINE int
00470 ACE_Reactor::reactor_event_loop_done (void)
00471 {
00472 ACE_TRACE ("ACE_Reactor::reactor_event_loop_done");
00473 return this->implementation_->deactivated ();
00474 }
00475
00476 ACE_INLINE size_t
00477 ACE_Reactor::size (void) const
00478 {
00479 return this->implementation ()->size ();
00480 }
00481
00482 ACE_INLINE bool
00483 ACE_Reactor::uses_event_associations (void)
00484 {
00485 return this->implementation ()->uses_event_associations ();
00486 }
00487
00488 ACE_INLINE void
00489 ACE_Reactor::dump (void) const
00490 {
00491 #if defined (ACE_HAS_DUMP)
00492 ACE_TRACE ("ACE_Reactor::dump");
00493
00494 implementation_->dump ();
00495 #endif
00496 }
00497
00498 ACE_END_VERSIONED_NAMESPACE_DECL