diff options
Diffstat (limited to 'ace/Select_Reactor_Base.cpp')
-rw-r--r-- | ace/Select_Reactor_Base.cpp | 37 |
1 files changed, 13 insertions, 24 deletions
diff --git a/ace/Select_Reactor_Base.cpp b/ace/Select_Reactor_Base.cpp index ab156aa1c20..75f3efb2d19 100644 --- a/ace/Select_Reactor_Base.cpp +++ b/ace/Select_Reactor_Base.cpp @@ -19,6 +19,8 @@ ACE_RCSID (ace, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + #if defined (ACE_WIN32) #define ACE_SELECT_REACTOR_HANDLE(H) (this->event_handlers_[(H)].handle_) #define ACE_SELECT_REACTOR_EVENT_HANDLER(THIS,H) ((THIS)->event_handlers_[(H)].event_handler_) @@ -444,8 +446,7 @@ ACE_Select_Reactor_Handler_Repository::unbind (ACE_HANDLE handle, // Call remove_reference() if the removal is complete and reference // counting is needed. - if (complete_removal && - requires_reference_counting) + if (complete_removal && requires_reference_counting) { event_handler->remove_reference (); } @@ -523,7 +524,7 @@ ACE_Select_Reactor_Handler_Repository::dump (void) const ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); ACE_DEBUG ((LM_DEBUG, - ACE_LIB_TEXT ("(%t) max_handlep1_ = %d, max_size_ = %d\n"), + ACE_LIB_TEXT ("max_handlep1_ = %d, max_size_ = %d\n"), this->max_handlep1_, this->max_size_)); ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("["))); @@ -532,10 +533,10 @@ ACE_Select_Reactor_Handler_Repository::dump (void) const for (ACE_Select_Reactor_Handler_Repository_Iterator iter (this); iter.next (event_handler) != 0; iter.advance ()) - ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT (" (event_handler = %x, event_handler->handle_ = %d)"), + ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT (" (event_handler = %x, event_handler->handle_ = %d)\n"), event_handler, event_handler->get_handle ())); - ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT (" ]"))); + ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT (" ]\n"))); ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP)); #endif /* ACE_HAS_DUMP */ } @@ -586,7 +587,7 @@ ACE_Select_Reactor_Notify::purge_pending_notifications (ACE_Event_Handler *eh, if (this->notify_queue_.is_empty ()) return 0; - ACE_Notification_Buffer *temp; + ACE_Notification_Buffer *temp = 0; ACE_Unbounded_Queue <ACE_Notification_Buffer *> local_queue; size_t queue_size = this->notify_queue_.size (); @@ -706,7 +707,7 @@ ACE_Select_Reactor_Notify::open (ACE_Reactor_Impl *r, #endif /* F_SETFD */ #if defined (ACE_HAS_REACTOR_NOTIFICATION_QUEUE) - ACE_Notification_Buffer *temp; + ACE_Notification_Buffer *temp = 0; ACE_NEW_RETURN (temp, ACE_Notification_Buffer[ACE_REACTOR_NOTIFICATION_ARRAY_SIZE], @@ -749,7 +750,7 @@ ACE_Select_Reactor_Notify::close (void) #if defined (ACE_HAS_REACTOR_NOTIFICATION_QUEUE) // Free up the dynamically allocated resources. - ACE_Notification_Buffer **b; + ACE_Notification_Buffer **b = 0; for (ACE_Unbounded_Queue_Iterator<ACE_Notification_Buffer *> alloc_iter (this->alloc_queue_); alloc_iter.next (b) != 0; @@ -802,7 +803,7 @@ ACE_Select_Reactor_Notify::notify (ACE_Event_Handler *event_handler, if (free_queue_.dequeue_head (temp) == -1) { // Grow the queue of available buffers. - ACE_Notification_Buffer *temp1; + ACE_Notification_Buffer *temp1 = 0; ACE_NEW_RETURN (temp1, ACE_Notification_Buffer[ACE_REACTOR_NOTIFICATION_ARRAY_SIZE], @@ -922,7 +923,7 @@ ACE_Select_Reactor_Notify::dispatch_notify (ACE_Notification_Buffer &buffer) // holding the lock while delivering callbacks... ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, mon, this->notify_queue_lock_, -1); - ACE_Notification_Buffer *temp; + ACE_Notification_Buffer *temp = 0; if (notify_queue_.is_empty ()) return 0; @@ -939,7 +940,7 @@ ACE_Select_Reactor_Notify::dispatch_notify (ACE_Notification_Buffer &buffer) -1); bool write_next_buffer = false; - ACE_Notification_Buffer ** next; + ACE_Notification_Buffer ** next = 0; if(!this->notify_queue_.is_empty()) { @@ -1255,16 +1256,4 @@ ACE_Select_Reactor_Impl::resumable_handler (void) return 0; } -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) -#if defined (ACE_HAS_REACTOR_NOTIFICATION_QUEUE) -template class ACE_Unbounded_Queue <ACE_Notification_Buffer *>; -template class ACE_Unbounded_Queue_Iterator <ACE_Notification_Buffer *>; -template class ACE_Node <ACE_Notification_Buffer *>; -#endif /* ACE_HAS_REACTOR_NOTIFICATION_QUEUE */ -#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#if defined (ACE_HAS_REACTOR_NOTIFICATION_QUEUE) -#pragma instantiate ACE_Unbounded_Queue <ACE_Notification_Buffer *> -#pragma instantiate ACE_Unbounded_Queue_Iterator <ACE_Notification_Buffer *> -#pragma instantiate ACE_Node <ACE_Notification_Buffer *> -#endif /* ACE_HAS_REACTOR_NOTIFICATION_QUEUE */ -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ +ACE_END_VERSIONED_NAMESPACE_DECL |