diff options
author | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-07-21 10:06:28 +0000 |
---|---|---|
committer | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-07-21 10:06:28 +0000 |
commit | 96c3e9ef1bffabc52d3848c43790dacd8e65497e (patch) | |
tree | 62003d1cf6be5d3e18bead66bb1e7e6fcb292c4e /ace/Reactor.i | |
parent | 6d1c286aa59a8665c741c89b3b8760327763238e (diff) | |
download | ATCD-96c3e9ef1bffabc52d3848c43790dacd8e65497e.tar.gz |
ChangeLogTag:Wed Jul 21 04:32:20 1999 Nanbor Wang <nanbor@cs.wustl.edu>
Diffstat (limited to 'ace/Reactor.i')
-rw-r--r-- | ace/Reactor.i | 290 |
1 files changed, 185 insertions, 105 deletions
diff --git a/ace/Reactor.i b/ace/Reactor.i index ba4c8dd01e9..c197c7f325a 100644 --- a/ace/Reactor.i +++ b/ace/Reactor.i @@ -23,11 +23,91 @@ ACE_Reactor::current_info (ACE_HANDLE handle, return this->implementation ()->current_info (handle, size); } -ACE_INLINE int +// Run the event loop until the <ACE_Reactor::handle_events> method +// returns -1 or the <end_event_loop> method is invoked. + +ACE_INLINE int +ACE_Reactor::run_event_loop (void) +{ + ACE_TRACE ("ACE_Reactor::run_event_loop"); + + return + ACE_Reactor::instance () + ->run_reactor_event_loop (ACE_Reactor::check_reconfiguration); +} + +// Run the event loop until the <ACE_Reactor::handle_events> +// method returns -1, the <end_event_loop> method +// is invoked, or the <ACE_Time_Value> expires. + +ACE_INLINE int +ACE_Reactor::run_event_loop (ACE_Time_Value &tv) +{ + ACE_TRACE ("ACE_Reactor::run_event_loop"); + + return + ACE_Reactor::instance () + ->run_reactor_event_loop (tv, + ACE_Reactor::check_reconfiguration); +} + +// Run the event loop until the <ACE_Reactor::alertable_handle_events> method +// returns -1 or the <end_event_loop> method is invoked. + +ACE_INLINE int +ACE_Reactor::run_alertable_event_loop (void) +{ + ACE_TRACE ("ACE_Reactor::run_alertable_event_loop"); + + return + ACE_Reactor::instance () + ->run_alertable_reactor_event_loop (ACE_Reactor::check_reconfiguration); +} + +// Run the event loop until the <ACE_Reactor::alertable_handle_events> +// method returns -1, the <end_event_loop> method +// is invoked, or the <ACE_Time_Value> expires. + +ACE_INLINE int +ACE_Reactor::run_alertable_event_loop (ACE_Time_Value &tv) +{ + ACE_TRACE ("ACE_Reactor::run_alertable_event_loop"); + + return + ACE_Reactor::instance () + ->run_alertable_reactor_event_loop (tv, + ACE_Reactor::check_reconfiguration); +} + +ACE_INLINE void +ACE_Reactor::reset_event_loop (void) +{ + ACE_TRACE ("ACE_Reactor::reset_event_loop"); + + ACE_Reactor::instance ()->reset_reactor_event_loop (); +} + +ACE_INLINE int +ACE_Reactor::end_event_loop (void) +{ + ACE_TRACE ("ACE_Reactor::end_event_loop"); + ACE_Reactor::instance ()->end_reactor_event_loop (); + + return 0; +} + +ACE_INLINE int +ACE_Reactor::event_loop_done (void) +{ + ACE_TRACE ("ACE_Reactor::event_loop_done"); + return ACE_Reactor::instance ()->reactor_event_loop_done (); +} + +ACE_INLINE int ACE_Reactor::open (size_t size, - int restart, - ACE_Sig_Handler *signal_handler, - ACE_Timer_Queue *timer_queue) + int restart, + ACE_Sig_Handler *signal_handler, + ACE_Timer_Queue *timer_queue) { return this->implementation ()->open (size, restart, @@ -46,46 +126,46 @@ ACE_Reactor::set_timer_queue (ACE_Timer_Queue *timer_queue) return this->implementation ()->set_timer_queue (timer_queue); } -ACE_INLINE int +ACE_INLINE int ACE_Reactor::close (void) { return this->implementation ()->close (); } -ACE_INLINE int +ACE_INLINE int ACE_Reactor::work_pending (const ACE_Time_Value &max_wait_time) { return this->implementation ()->work_pending (max_wait_time); } -ACE_INLINE int +ACE_INLINE int ACE_Reactor::handle_events (ACE_Time_Value *max_wait_time) { return this->implementation ()->handle_events (max_wait_time); } -ACE_INLINE int +ACE_INLINE int ACE_Reactor::alertable_handle_events (ACE_Time_Value *max_wait_time) { return this->implementation ()->alertable_handle_events (max_wait_time); } -ACE_INLINE int +ACE_INLINE int ACE_Reactor::handle_events (ACE_Time_Value &max_wait_time) { return this->implementation ()->handle_events (max_wait_time); } -ACE_INLINE int +ACE_INLINE int ACE_Reactor::alertable_handle_events (ACE_Time_Value &max_wait_time) { return this->implementation ()->alertable_handle_events (max_wait_time); } -ACE_INLINE int +ACE_INLINE int ACE_Reactor::register_handler (ACE_Event_Handler *event_handler, - ACE_Reactor_Mask mask) + ACE_Reactor_Mask mask) { int result = this->implementation ()->register_handler (event_handler, mask); @@ -96,10 +176,10 @@ ACE_Reactor::register_handler (ACE_Event_Handler *event_handler, return result; } -ACE_INLINE int +ACE_INLINE int ACE_Reactor::register_handler (ACE_HANDLE io_handle, - ACE_Event_Handler *event_handler, - ACE_Reactor_Mask mask) + ACE_Event_Handler *event_handler, + ACE_Reactor_Mask mask) { int result = this->implementation ()->register_handler (io_handle, event_handler, @@ -110,12 +190,12 @@ ACE_Reactor::register_handler (ACE_HANDLE io_handle, return result; } - + #if defined (ACE_WIN32) -ACE_INLINE int +ACE_INLINE int ACE_Reactor::register_handler (ACE_Event_Handler *event_handler, - ACE_HANDLE event_handle) + ACE_HANDLE event_handle) { int result = this->implementation ()->register_handler (event_handler, event_handle); @@ -125,14 +205,14 @@ ACE_Reactor::register_handler (ACE_Event_Handler *event_handler, return result; } - + #endif /* ACE_WIN32 */ -ACE_INLINE int +ACE_INLINE int ACE_Reactor::register_handler (ACE_HANDLE event_handle, - ACE_HANDLE io_handle, - ACE_Event_Handler *event_handler, - ACE_Reactor_Mask mask) + ACE_HANDLE io_handle, + ACE_Event_Handler *event_handler, + ACE_Reactor_Mask mask) { int result = this->implementation ()->register_handler (event_handle, io_handle, @@ -144,11 +224,11 @@ ACE_Reactor::register_handler (ACE_HANDLE event_handle, return result; } - -ACE_INLINE int + +ACE_INLINE int ACE_Reactor::register_handler (const ACE_Handle_Set &handles, - ACE_Event_Handler *event_handler, - ACE_Reactor_Mask mask) + ACE_Event_Handler *event_handler, + ACE_Reactor_Mask mask) { int result = this->implementation ()->register_handler (handles, event_handler, @@ -156,16 +236,16 @@ ACE_Reactor::register_handler (const ACE_Handle_Set &handles, if (result != -1) // Assign *this* <Reactor> to the <Event_Handler>. event_handler->reactor (this); - + return result; } -ACE_INLINE int +ACE_INLINE int ACE_Reactor::register_handler (int signum, - ACE_Event_Handler *new_sh, - ACE_Sig_Action *new_disp, - ACE_Event_Handler **old_sh, - ACE_Sig_Action *old_disp) + ACE_Event_Handler *new_sh, + ACE_Sig_Action *new_disp, + ACE_Event_Handler **old_sh, + ACE_Sig_Action *old_disp) { return this->implementation ()->register_handler (signum, new_sh, @@ -174,45 +254,45 @@ ACE_Reactor::register_handler (int signum, old_disp); } -ACE_INLINE int +ACE_INLINE int ACE_Reactor::register_handler (const ACE_Sig_Set &sigset, - ACE_Event_Handler *new_sh, - ACE_Sig_Action *new_disp) + ACE_Event_Handler *new_sh, + ACE_Sig_Action *new_disp) { return this->implementation ()->register_handler (sigset, new_sh, new_disp); } -ACE_INLINE int +ACE_INLINE int ACE_Reactor::remove_handler (ACE_Event_Handler *event_handler, - ACE_Reactor_Mask mask) + ACE_Reactor_Mask mask) { return this->implementation ()->remove_handler (event_handler, mask); } -ACE_INLINE int +ACE_INLINE int ACE_Reactor::remove_handler (ACE_HANDLE handle, - ACE_Reactor_Mask mask) + ACE_Reactor_Mask mask) { return this->implementation ()->remove_handler (handle, mask); } -ACE_INLINE int +ACE_INLINE int ACE_Reactor::remove_handler (const ACE_Handle_Set &handle_set, - ACE_Reactor_Mask mask) + ACE_Reactor_Mask mask) { return this->implementation ()->remove_handler (handle_set, mask); } -ACE_INLINE int +ACE_INLINE int ACE_Reactor::remove_handler (int signum, - ACE_Sig_Action *new_disp, - ACE_Sig_Action *old_disp, - int sigkey) + ACE_Sig_Action *new_disp, + ACE_Sig_Action *old_disp, + int sigkey) { return this->implementation ()->remove_handler (signum, new_disp, @@ -220,67 +300,67 @@ ACE_Reactor::remove_handler (int signum, sigkey); } -ACE_INLINE int +ACE_INLINE int ACE_Reactor::remove_handler (const ACE_Sig_Set &sigset) { return this->implementation ()->remove_handler (sigset); } -ACE_INLINE int +ACE_INLINE int ACE_Reactor::suspend_handler (ACE_Event_Handler *event_handler) { return this->implementation ()->suspend_handler (event_handler); } -ACE_INLINE int +ACE_INLINE int ACE_Reactor::suspend_handler (ACE_HANDLE handle) { return this->implementation ()->suspend_handler (handle); } -ACE_INLINE int +ACE_INLINE int ACE_Reactor::suspend_handler (const ACE_Handle_Set &handles) { return this->implementation ()->suspend_handler (handles); } -ACE_INLINE int +ACE_INLINE int ACE_Reactor::suspend_handlers (void) { return this->implementation ()->suspend_handlers (); } -ACE_INLINE int +ACE_INLINE int ACE_Reactor::resume_handler (ACE_Event_Handler *event_handler) { return this->implementation ()->resume_handler (event_handler); } -ACE_INLINE int +ACE_INLINE int ACE_Reactor::resume_handler (ACE_HANDLE handle) { return this->implementation ()->resume_handler (handle); } -ACE_INLINE int +ACE_INLINE int ACE_Reactor::resume_handler (const ACE_Handle_Set &handles) { return this->implementation ()->resume_handler (handles); } -ACE_INLINE int +ACE_INLINE int ACE_Reactor::resume_handlers (void) { return this->implementation ()->resume_handlers (); } -ACE_INLINE long +ACE_INLINE long ACE_Reactor::schedule_timer (ACE_Event_Handler *event_handler, - const void *arg, - const ACE_Time_Value &delta, - const ACE_Time_Value &interval) + const void *arg, + const ACE_Time_Value &delta, + const ACE_Time_Value &interval) { int result = this->implementation ()->schedule_timer (event_handler, arg, @@ -293,28 +373,28 @@ ACE_Reactor::schedule_timer (ACE_Event_Handler *event_handler, return result; } -ACE_INLINE int +ACE_INLINE int ACE_Reactor::cancel_timer (ACE_Event_Handler *event_handler, - int dont_call_handle_close) + int dont_call_handle_close) { return this->implementation ()->cancel_timer (event_handler, dont_call_handle_close); } -ACE_INLINE int +ACE_INLINE int ACE_Reactor::cancel_timer (long timer_id, - const void **arg, - int dont_call_handle_close) + const void **arg, + int dont_call_handle_close) { return this->implementation ()->cancel_timer (timer_id, arg, dont_call_handle_close); } - -ACE_INLINE int + +ACE_INLINE int ACE_Reactor::schedule_wakeup (ACE_Event_Handler *event_handler, - ACE_Reactor_Mask masks_to_be_added) + ACE_Reactor_Mask masks_to_be_added) { int result = this->implementation ()->schedule_wakeup (event_handler, masks_to_be_added); @@ -324,73 +404,73 @@ ACE_Reactor::schedule_wakeup (ACE_Event_Handler *event_handler, return result; } - -ACE_INLINE int + +ACE_INLINE int ACE_Reactor::schedule_wakeup (ACE_HANDLE handle, - ACE_Reactor_Mask masks_to_be_added) + ACE_Reactor_Mask masks_to_be_added) { return implementation ()->schedule_wakeup (handle, masks_to_be_added); } -ACE_INLINE int +ACE_INLINE int ACE_Reactor::cancel_wakeup (ACE_Event_Handler *event_handler, - ACE_Reactor_Mask masks_to_be_cleared) + ACE_Reactor_Mask masks_to_be_cleared) { return this->implementation ()->cancel_wakeup (event_handler, masks_to_be_cleared); } -ACE_INLINE int +ACE_INLINE int ACE_Reactor::cancel_wakeup (ACE_HANDLE handle, - ACE_Reactor_Mask masks_to_be_cleared) + ACE_Reactor_Mask masks_to_be_cleared) { return this->implementation ()->cancel_wakeup (handle, masks_to_be_cleared); } -ACE_INLINE int +ACE_INLINE int ACE_Reactor::notify (ACE_Event_Handler *event_handler, - ACE_Reactor_Mask mask, - ACE_Time_Value *tv) + ACE_Reactor_Mask mask, + ACE_Time_Value *tv) { return this->implementation ()->notify (event_handler, mask, tv); } -ACE_INLINE void +ACE_INLINE void ACE_Reactor::max_notify_iterations (int iterations) { this->implementation ()->max_notify_iterations (iterations); } -ACE_INLINE int +ACE_INLINE int ACE_Reactor::max_notify_iterations (void) { return this->implementation ()->max_notify_iterations (); } -ACE_INLINE int +ACE_INLINE int ACE_Reactor::handler (ACE_HANDLE handle, - ACE_Reactor_Mask mask, - ACE_Event_Handler **event_handler) + ACE_Reactor_Mask mask, + ACE_Event_Handler **event_handler) { return this->implementation ()->handler (handle, mask, event_handler); } -ACE_INLINE int +ACE_INLINE int ACE_Reactor::handler (int signum, - ACE_Event_Handler **event_handler) + ACE_Event_Handler **event_handler) { return this->implementation ()->handler (signum, event_handler); } -ACE_INLINE int +ACE_INLINE int ACE_Reactor::initialized (void) { return this->implementation ()->initialized (); @@ -402,73 +482,73 @@ ACE_Reactor::lock (void) return this->implementation ()->lock (); } -ACE_INLINE void +ACE_INLINE void ACE_Reactor::wakeup_all_threads (void) { this->implementation ()->wakeup_all_threads (); } -ACE_INLINE int -ACE_Reactor::owner (ACE_thread_t new_owner, - ACE_thread_t *old_owner) +ACE_INLINE int +ACE_Reactor::owner (ACE_thread_t new_owner, + ACE_thread_t *old_owner) { - return this->implementation ()->owner (new_owner, + return this->implementation ()->owner (new_owner, old_owner); } -ACE_INLINE int +ACE_INLINE int ACE_Reactor::owner (ACE_thread_t *owner) { return this->implementation ()->owner (owner); } -ACE_INLINE void +ACE_INLINE void ACE_Reactor::requeue_position (int position) { this->implementation ()->requeue_position (position); } -ACE_INLINE int +ACE_INLINE int ACE_Reactor::requeue_position (void) { return this->implementation ()->requeue_position (); } -ACE_INLINE int +ACE_INLINE int ACE_Reactor::mask_ops (ACE_Event_Handler *event_handler, - ACE_Reactor_Mask mask, - int ops) + ACE_Reactor_Mask mask, + int ops) { return this->implementation ()->mask_ops (event_handler, mask, ops); } -ACE_INLINE int +ACE_INLINE int ACE_Reactor::mask_ops (ACE_HANDLE handle, - ACE_Reactor_Mask mask, - int ops) + ACE_Reactor_Mask mask, + int ops) { return this->implementation ()->mask_ops (handle, mask, ops); } -ACE_INLINE int +ACE_INLINE int ACE_Reactor::ready_ops (ACE_Event_Handler *event_handler, - ACE_Reactor_Mask mask, - int ops) + ACE_Reactor_Mask mask, + int ops) { return this->implementation ()->ready_ops (event_handler, mask, ops); } -ACE_INLINE int +ACE_INLINE int ACE_Reactor::ready_ops (ACE_HANDLE handle, - ACE_Reactor_Mask mask, - int ops) + ACE_Reactor_Mask mask, + int ops) { return this->implementation ()->ready_ops (handle, mask, |