From 2326eb1d56ce858a00104f0f4c85f10cb93635c8 Mon Sep 17 00:00:00 2001 From: bala Date: Wed, 7 Jan 2004 19:27:20 +0000 Subject: ChangeLogTag:Wed Jan 7 13:09:27 2004 Balachandran Natarajan --- ChangeLog | 4 ++-- ace/OS_NS_Thread.h | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index cca2bbcd242..e905eb7bfa2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,8 +8,8 @@ Wed Jan 7 13:09:27 2004 Balachandran Natarajan ACE_Auto_Event. The idea behind the said checkin was to do a check whether a proper event occured during event_wait (), insted of a spurious wakeup call. This was achieved by checking - the value of is_signaled_. This works great for manual - events. For auto events, we don't set the variable value if we + the value of . This works great for manual + events. For auto events, we don't set the variable value if we have waiting threads. This makes the threads calling Auto_Event.wait () to wait for ever. diff --git a/ace/OS_NS_Thread.h b/ace/OS_NS_Thread.h index 39827f52f41..9cfb60f63e0 100644 --- a/ace/OS_NS_Thread.h +++ b/ace/OS_NS_Thread.h @@ -68,6 +68,7 @@ typedef struct # if defined (ACE_PSOS) +// @@ Note, why is this specially defined for PSOS? // Wrapper for NT events on pSOS. class ACE_Export ACE_event_t { @@ -85,6 +86,16 @@ protected: /// "True" if signaled. int is_signaled_; + /// Special bool for auto_events alone + /** + * The semantics of auto events forces us to introduce this extra + * variable to ensure that the thread is not woken up + * spuriously. Please see event_wait and event_timedwait () to see + * how this is used for auto_events. Theoretically this is a hack + * that needs revisiting after x.4 + */ + bool auto_event_signaled_; + /// Number of waiting threads. u_long waiting_threads_; }; -- cgit v1.2.1