diff options
author | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2002-05-02 06:45:38 +0000 |
---|---|---|
committer | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2002-05-02 06:45:38 +0000 |
commit | 8da1a66c5cf50c6641101ba01da2abe372bb3b02 (patch) | |
tree | 9c41548ab0fb703840d8a48ad340e6c647a34533 /TAO/tao/Connection_Handler.cpp | |
parent | 5e391b4ce42cb6d1089ae951c3437a19ec4af137 (diff) | |
download | ATCD-8da1a66c5cf50c6641101ba01da2abe372bb3b02.tar.gz |
ChangeLogTag: Thu May 2 01:44:35 2002 Irfan Pyarali <irfan@cs.wustl.edu>
Diffstat (limited to 'TAO/tao/Connection_Handler.cpp')
-rw-r--r-- | TAO/tao/Connection_Handler.cpp | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/TAO/tao/Connection_Handler.cpp b/TAO/tao/Connection_Handler.cpp index 049e2f5ddf9..fe292e370e8 100644 --- a/TAO/tao/Connection_Handler.cpp +++ b/TAO/tao/Connection_Handler.cpp @@ -154,3 +154,50 @@ TAO_Connection_Handler::transport (TAO_Transport* transport) this->transport_ = TAO_Transport::_duplicate (transport); } + +int +TAO_Connection_Handler::incr_refcount (void) +{ + ACE_GUARD_RETURN (ACE_Lock, + ace_mon, + *this->pending_upcall_lock_, -1); + + return ++this->reference_count_; +} + +void +TAO_Connection_Handler::decr_refcount (void) +{ + { + ACE_GUARD (ACE_Lock, + ace_mon, + *this->pending_upcall_lock_); + + --this->reference_count_; + } + + if (this->reference_count_ == 0) + this->handle_close_i (); +} + +int +TAO_Connection_Handler::incr_pending_upcalls (void) +{ + ACE_GUARD_RETURN (ACE_Lock, + ace_mon, + *this->pending_upcall_lock_, -1); + + return ++this->pending_upcalls_; + + +} + +int +TAO_Connection_Handler::decr_pending_upcalls (void) +{ + ACE_GUARD_RETURN (ACE_Lock, + ace_mon, + *this->pending_upcall_lock_, -1); + + return --this->pending_upcalls_; +} |