diff options
-rw-r--r-- | TAO/tao/Asynch_Reply_Dispatcher_Base.cpp | 31 | ||||
-rw-r--r-- | TAO/tao/Asynch_Reply_Dispatcher_Base.h | 6 | ||||
-rw-r--r-- | TAO/tao/ObjectKey_Table.cpp | 2 | ||||
-rw-r--r-- | TAO/tao/Refcounted_ObjectKey.cpp | 2 | ||||
-rw-r--r-- | TAO/tao/Refcounted_ObjectKey.h | 11 | ||||
-rw-r--r-- | TAO/tao/Refcounted_ObjectKey.inl | 4 |
6 files changed, 29 insertions, 27 deletions
diff --git a/TAO/tao/Asynch_Reply_Dispatcher_Base.cpp b/TAO/tao/Asynch_Reply_Dispatcher_Base.cpp index 1f01eca39f6..edda3e1c449 100644 --- a/TAO/tao/Asynch_Reply_Dispatcher_Base.cpp +++ b/TAO/tao/Asynch_Reply_Dispatcher_Base.cpp @@ -86,28 +86,26 @@ TAO_Asynch_Reply_Dispatcher_Base::reply_timed_out (void) { } -long +void TAO_Asynch_Reply_Dispatcher_Base::incr_refcount (void) { - ACE_GUARD_RETURN (ACE_Lock, - mutex, - *this->lock_, - -1); - return ++this->refcount_; + ACE_GUARD (ACE_Lock, + mutex, + *this->lock_); + ++this->refcount_; } -long +void TAO_Asynch_Reply_Dispatcher_Base::decr_refcount (void) { { - ACE_GUARD_RETURN (ACE_Lock, - mutex, - *this->lock_, - -1); + ACE_GUARD (ACE_Lock, + mutex, + *this->lock_); --this->refcount_; if (this->refcount_ > 0) - return this->refcount_; + return; } if (this->allocator_) @@ -121,16 +119,17 @@ TAO_Asynch_Reply_Dispatcher_Base::decr_refcount (void) delete this; } - return 0; + return; } bool TAO_Asynch_Reply_Dispatcher_Base::try_dispatch_reply (void) { if (this->is_reply_dispatched_) - return false; - - if (!this->is_reply_dispatched_) + { + return false; + } + else { ACE_GUARD_RETURN (ACE_Lock, mutex, diff --git a/TAO/tao/Asynch_Reply_Dispatcher_Base.h b/TAO/tao/Asynch_Reply_Dispatcher_Base.h index 671c188a325..d2d81cbb221 100644 --- a/TAO/tao/Asynch_Reply_Dispatcher_Base.h +++ b/TAO/tao/Asynch_Reply_Dispatcher_Base.h @@ -70,8 +70,8 @@ public: /// @name Mutators for refcount //@{ - long incr_refcount (void); - long decr_refcount (void); + void incr_refcount (void); + void decr_refcount (void); //@} /// A helper method that can be used by the subclasses @@ -125,7 +125,7 @@ private: ACE_Lock *lock_; /// Refcount paraphernalia for this class - long refcount_; + CORBA::ULong refcount_; /// Has the reply been dispatched? bool is_reply_dispatched_; diff --git a/TAO/tao/ObjectKey_Table.cpp b/TAO/tao/ObjectKey_Table.cpp index 2915c3dd7ec..e3e52089e4a 100644 --- a/TAO/tao/ObjectKey_Table.cpp +++ b/TAO/tao/ObjectKey_Table.cpp @@ -92,7 +92,7 @@ TAO::ObjectKey_Table::bind (const TAO::ObjectKey &key, key_new); } - (void) key_new->incr_refcount (); + key_new->incr_refcount (); } return retval; diff --git a/TAO/tao/Refcounted_ObjectKey.cpp b/TAO/tao/Refcounted_ObjectKey.cpp index 9e8a02109bb..074a9e3d6ed 100644 --- a/TAO/tao/Refcounted_ObjectKey.cpp +++ b/TAO/tao/Refcounted_ObjectKey.cpp @@ -23,7 +23,7 @@ TAO::Refcounted_ObjectKey::~Refcounted_ObjectKey (void) { } -long +CORBA::ULong TAO::Refcounted_ObjectKey::decr_refcount (void) { if (--this->ref_count_ > 0) diff --git a/TAO/tao/Refcounted_ObjectKey.h b/TAO/tao/Refcounted_ObjectKey.h index 4143f1e8af7..5c0ae02629d 100644 --- a/TAO/tao/Refcounted_ObjectKey.h +++ b/TAO/tao/Refcounted_ObjectKey.h @@ -52,16 +52,19 @@ namespace TAO /// Protected destructor ~Refcounted_ObjectKey (void); - /// Methods for incrementing and decrementing refcounts. - long incr_refcount (void); - long decr_refcount (void); + /// Methods for incrementing refcount. + void incr_refcount (void); + + /// Methods for decrementing refcount. Return the refcount, used by the + /// ObjectKey table. + CORBA::ULong decr_refcount (void); private: /// The object key ObjectKey object_key_; /// The refcount on the object key.. - long ref_count_; + CORBA::ULong ref_count_; }; } diff --git a/TAO/tao/Refcounted_ObjectKey.inl b/TAO/tao/Refcounted_ObjectKey.inl index be9f8f8496d..117f9db4ee9 100644 --- a/TAO/tao/Refcounted_ObjectKey.inl +++ b/TAO/tao/Refcounted_ObjectKey.inl @@ -5,10 +5,10 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -ACE_INLINE long +ACE_INLINE void TAO::Refcounted_ObjectKey::incr_refcount (void) { - return ++this->ref_count_; + ++this->ref_count_; } ACE_INLINE const TAO::ObjectKey & |