Updated logging to include the class/method so that it is more obvious where these...
[ACE_TAO.git] / TAO / tao / LF_Follower.h
blob9d81113e8a36aa4e439c2ba03c7b6e994075e91a
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file LF_Follower.h
7 * @author Carlos O'Ryan <coryan@uci.edu>
8 */
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)
19 # 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;
33 /**
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>
45 public:
46 /// Constructor
47 TAO_LF_Follower (TAO_Leader_Follower &leader_follower);
49 /// Destructor
50 ~TAO_LF_Follower (void);
52 /// Access the leader follower that owns this follower
53 TAO_Leader_Follower &leader_follower (void);
55 /// Wait until on the underlying condition variable
56 int wait (ACE_Time_Value *tv);
58 /// Signal the underlying condition variable
59 int signal (void);
61 private:
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 */