summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordai_y <dai_y@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2008-10-03 19:10:56 +0000
committerdai_y <dai_y@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2008-10-03 19:10:56 +0000
commit9a08a52a53e64114f714f18f51cb0050b18599e7 (patch)
tree18e643762971cec6ea171dfd77333cc0c0f7c176
parentdd88c74807c60ebbe1dc40480f6c684786da6b48 (diff)
downloadATCD-9a08a52a53e64114f714f18f51cb0050b18599e7.tar.gz
Fri Oct 3 19:05:39 UTC 2008 Yan Dai <dai_y@ociweb.com>
-rw-r--r--ACE/ChangeLog8
-rw-r--r--ACE/ace/Reactor_Token_T.cpp18
2 files changed, 22 insertions, 4 deletions
diff --git a/ACE/ChangeLog b/ACE/ChangeLog
index 28328ca82e6..5fac86b2383 100644
--- a/ACE/ChangeLog
+++ b/ACE/ChangeLog
@@ -1,3 +1,11 @@
+Fri Oct 3 19:05:39 UTC 2008 Yan Dai <dai_y@ociweb.com>
+
+ * ace/Reactor_Token_T.cpp:
+
+ Made reactor notify with zero timeout and ignore timeout case in
+ sleep_hook(). This would fix bugzilla 2465 reactor deadlock
+ problem.
+
Thu Oct 2 16:41:57 UTC 2008 Steve Huston <shuston@riverace.com>
* ace/Basic_Types.h: Adjust the byte order decision for Itanium
diff --git a/ACE/ace/Reactor_Token_T.cpp b/ACE/ace/Reactor_Token_T.cpp
index 73ab406db63..42ef81fed3b 100644
--- a/ACE/ace/Reactor_Token_T.cpp
+++ b/ACE/ace/Reactor_Token_T.cpp
@@ -61,10 +61,20 @@ template <class ACE_TOKEN_TYPE> void
ACE_Reactor_Token_T<ACE_TOKEN_TYPE>::sleep_hook (void)
{
ACE_TRACE ("ACE_Reactor_Token_T::sleep_hook");
- if (this->reactor_->notify () == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("sleep_hook failed")));
+ ACE_Time_Value ping = ACE_Time_Value::zero;
+ if (this->reactor_->notify (0, ACE_Event_Handler::EXCEPT_MASK, &ping) == -1)
+ {
+ if (errno == ETIME)
+ {
+ errno = 0;
+ }
+ else
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("sleep_hook failed")));
+ }
+ }
}
ACE_END_VERSIONED_NAMESPACE_DECL