summaryrefslogtreecommitdiff
path: root/TAO/tao/Leader_Follower.i
diff options
context:
space:
mode:
authorkitty <kitty@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-03-27 05:34:53 +0000
committerkitty <kitty@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-03-27 05:34:53 +0000
commit7f26956772748f622f8d109992fcd921b12e2643 (patch)
tree9186b36f40b2cc3951dec68b8c19459a0b120685 /TAO/tao/Leader_Follower.i
parent00a7ce2b8a3de1faf154f1fc552fd4eea332003d (diff)
downloadATCD-7f26956772748f622f8d109992fcd921b12e2643.tar.gz
Mon Mar 26 23:29:47 2001 Krishnakumar B <kitty@cs.wustl.edu>
* Leader_Follower.{i,h,cpp} * Wait_On_Leader_Follower.cpp Implemented the Leader_Follower component of the ORD to use a stack instead of a heap, using the same strategy as in ACE_Token. This fixes Bug 721.
Diffstat (limited to 'TAO/tao/Leader_Follower.i')
-rw-r--r--TAO/tao/Leader_Follower.i14
1 files changed, 10 insertions, 4 deletions
diff --git a/TAO/tao/Leader_Follower.i b/TAO/tao/Leader_Follower.i
index 08a0a301058..db9324ae84d 100644
--- a/TAO/tao/Leader_Follower.i
+++ b/TAO/tao/Leader_Follower.i
@@ -156,15 +156,15 @@ TAO_Leader_Follower::is_client_leader_thread (void) const
}
ACE_INLINE int
-TAO_Leader_Follower::add_follower (TAO_SYNCH_CONDITION *follower_ptr)
+TAO_Leader_Follower::add_follower (TAO_Follower_Node *follower_node)
{
- return this->follower_set_.insert (follower_ptr);
+ return this->follower_set_.insert (follower_node);
}
ACE_INLINE int
-TAO_Leader_Follower::remove_follower (TAO_SYNCH_CONDITION *follower_ptr)
+TAO_Leader_Follower::remove_follower (TAO_Follower_Node *follower_node)
{
- return this->follower_set_.remove (follower_ptr);
+ return this->follower_set_.remove (follower_node);
}
ACE_INLINE ACE_Reverse_Lock<TAO_SYNCH_MUTEX> &
@@ -179,6 +179,12 @@ TAO_Leader_Follower::has_clients (void) const
return this->clients_;
}
+ACE_INLINE int
+TAO_Leader_Follower::TAO_Follower_Queue::is_empty (void) const
+{
+ return this->head_ == 0;
+}
+
ACE_INLINE
TAO_LF_Client_Thread_Helper::TAO_LF_Client_Thread_Helper (TAO_Leader_Follower &leader_follower)
: leader_follower_ (leader_follower)