diff options
author | kitty <kitty@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-03-27 05:34:53 +0000 |
---|---|---|
committer | kitty <kitty@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-03-27 05:34:53 +0000 |
commit | 7f26956772748f622f8d109992fcd921b12e2643 (patch) | |
tree | 9186b36f40b2cc3951dec68b8c19459a0b120685 /TAO/tao/Leader_Follower.i | |
parent | 00a7ce2b8a3de1faf154f1fc552fd4eea332003d (diff) | |
download | ATCD-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.i | 14 |
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) |