summaryrefslogtreecommitdiff
path: root/ACE/ace/Timer_Queue_Adapters.cpp
diff options
context:
space:
mode:
authorSteve Huston <shuston@riverace.com>2010-10-20 16:34:57 +0000
committerSteve Huston <shuston@riverace.com>2010-10-20 16:34:57 +0000
commitbc3e875e5a1aa990afc2c3b8d8c158634d0477e8 (patch)
tree37ec1920c96eb2d11ca81aed38a8def36efd56dd /ACE/ace/Timer_Queue_Adapters.cpp
parent714b8ebd829c95e6770dcaa39d0f3f8eb9791d08 (diff)
downloadATCD-bc3e875e5a1aa990afc2c3b8d8c158634d0477e8.tar.gz
ChangeLogTag:Wed Oct 20 16:07:09 UTC 2010 Steve Huston <shuston@riverace.com>
Diffstat (limited to 'ACE/ace/Timer_Queue_Adapters.cpp')
-rw-r--r--ACE/ace/Timer_Queue_Adapters.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/ACE/ace/Timer_Queue_Adapters.cpp b/ACE/ace/Timer_Queue_Adapters.cpp
index 1c04fd6eed2..fe6be3f4adc 100644
--- a/ACE/ace/Timer_Queue_Adapters.cpp
+++ b/ACE/ace/Timer_Queue_Adapters.cpp
@@ -17,6 +17,7 @@
# include "ace/Timer_Queue_Adapters.inl"
# endif /* __ACE_INLINE__ */
+#include "ace/Reverse_Lock_T.h"
#include "ace/Signal.h"
#include "ace/OS_NS_unistd.h"
#include "ace/OS_NS_sys_time.h"
@@ -278,8 +279,15 @@ ACE_Thread_Timer_Queue_Adapter<TQ, TYPE>::svc (void)
}
}
- // Expire timers anyway, at worst this is a no-op.
- this->timer_queue_->expire ();
+ // Expire timers anyway, at worst this is a no-op. Release the lock
+ // while dispatching; the timer queue has its own lock to protect
+ // itself.
+ {
+ ACE_Reverse_Lock<ACE_SYNCH_RECURSIVE_MUTEX> rel (this->mutex_);
+ ACE_GUARD_RETURN (ACE_Reverse_Lock<ACE_SYNCH_RECURSIVE_MUTEX>,
+ rmon, rel, -1);
+ this->timer_queue_->expire ();
+ }
}
// Thread cancellation point, if ACE supports it.