diff options
author | Steve Huston <shuston@riverace.com> | 2009-11-10 00:44:01 +0000 |
---|---|---|
committer | Steve Huston <shuston@riverace.com> | 2009-11-10 00:44:01 +0000 |
commit | 065d731387eb51f6f15662d9544a1398e08dda9e (patch) | |
tree | 2d671b2ffd5773203936f21564fcf112f0d74f31 | |
parent | d7127fa1a5fafd8a5f76b7366698ddbf10db8b28 (diff) | |
download | ATCD-065d731387eb51f6f15662d9544a1398e08dda9e.tar.gz |
ChangeLogTag:Tue Nov 10 00:35:52 UTC 2009 Steve Huston <shuston@riverace.com>
-rw-r--r-- | ACE/ChangeLog | 9 | ||||
-rw-r--r-- | ACE/ace/Dev_Poll_Reactor.cpp | 17 |
2 files changed, 18 insertions, 8 deletions
diff --git a/ACE/ChangeLog b/ACE/ChangeLog index 30e8236ac05..18c7c051310 100644 --- a/ACE/ChangeLog +++ b/ACE/ChangeLog @@ -1,3 +1,12 @@ +Tue Nov 10 00:35:52 UTC 2009 Steve Huston <shuston@riverace.com> + + * ace/Dev_Poll_Reactor.cpp: Some changes extraneous to those in + Wed Nov 4 00:07:49 UTC 2009 Steve Huston <shuston@riverace.com> + got checked in by accident; these screwed up the handle resuming + and are now reverted. The changes/fix mentioned in + Wed Nov 4 00:07:49 UTC 2009 Steve Huston <shuston@riverace.com> + are now the only ones included. + Mon Nov 9 12:20:05 UTC 2009 William R. Otte <wotte@dre.vanderbilt.edu> * tests/Message_Queue_Test.cpp: diff --git a/ACE/ace/Dev_Poll_Reactor.cpp b/ACE/ace/Dev_Poll_Reactor.cpp index 9f92f39a9f2..75b88255e23 100644 --- a/ACE/ace/Dev_Poll_Reactor.cpp +++ b/ACE/ace/Dev_Poll_Reactor.cpp @@ -1269,7 +1269,13 @@ ACE_Dev_Poll_Reactor::dispatch_io_event (Token_Guard &guard) // With epoll, events are registered with oneshot, so the handle is // effectively suspended; future calls to epoll_wait() will select // the next event, so they're not managed here. + // The hitch to this is that the notify handler must always be resumed + // immediately, before letting go of the guard. Else it's possible to + // get into a state where all handles, including the notify pipe, are + // suspended and that means the wait thread can't be interrupted. info->suspended = true; + if (eh == this->notify_handler_) + this->resume_handler_i (handle); #endif /* ACE_HAS_DEV_POLL */ int status = 0; // gets callback status, below. @@ -1298,17 +1304,12 @@ ACE_Dev_Poll_Reactor::dispatch_io_event (Token_Guard &guard) if (info != 0 && info->event_handler == eh) { if (status < 0) - { - this->remove_handler_i (handle, disp_mask); - // Handler may be gone now; reset info w/ current status. - info = this->handler_rep_.find (handle); - } + this->remove_handler_i (handle, disp_mask); #ifdef ACE_HAS_EVENT_POLL // epoll-based effectively suspends handlers around the upcall. // If the handler must be resumed here, do it now. - if (info != 0 && info->event_handler == eh && - info->suspended && + if (info->suspended && (eh->resume_handler () == ACE_Event_Handler::ACE_REACTOR_RESUMES_HANDLER)) this->resume_handler_i (handle); @@ -1859,7 +1860,7 @@ ACE_Dev_Poll_Reactor::resume_handler_i (ACE_HANDLE handle) if (mask == ACE_Event_Handler::NULL_MASK) { info->suspended = false; - return 0; // Nothing to do + return 0; } // Place the handle back in to the "interest set." |