3 //=============================================================================
7 * @author Carlos O'Ryan <coryan@uci.edu>
9 //=============================================================================
11 #ifndef TAO_LF_FOLLOWER_H
12 #define TAO_LF_FOLLOWER_H
14 #include /**/ "ace/pre.h"
16 #include /**/ "tao/TAO_Export.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #include /**/ "tao/Versioned_Namespace.h"
24 #include "ace/Condition_Thread_Mutex.h"
25 #include "ace/Synch_Traits.h"
26 #include "ace/Intrusive_List_Node.h"
29 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
31 class TAO_Leader_Follower
;
34 * @class TAO_LF_Follower
36 * @brief Represent a thread blocked, as a follower, in the
37 * Leader/Followers set.
39 * @todo Currently this class offers little abstraction, the follower
40 * loop should be implemented by this class.
42 class TAO_Export TAO_LF_Follower
43 : public ACE_Intrusive_List_Node
<TAO_LF_Follower
>
47 TAO_LF_Follower (TAO_Leader_Follower
&leader_follower
);
52 /// Access the leader follower that owns this follower
53 TAO_Leader_Follower
&leader_follower ();
55 /// Wait until on the underlying condition variable
56 int wait (ACE_Time_Value
*tv
);
58 /// Signal the underlying condition variable
62 /// The Leader/Follower set this Follower belongs to
63 TAO_Leader_Follower
&leader_follower_
;
65 /// Condition variable used to
66 ACE_SYNCH_CONDITION condition_
;
69 TAO_END_VERSIONED_NAMESPACE_DECL
71 #if defined (__ACE_INLINE__)
72 # include "tao/LF_Follower.inl"
73 #endif /* __ACE_INLINE__ */
75 #include /**/ "ace/post.h"
77 #endif /* TAO_LF_FOLLOWER_H */