summaryrefslogtreecommitdiff
path: root/TAO/tao/Object.i
diff options
context:
space:
mode:
authorcoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-07-21 19:21:31 +0000
committercoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-07-21 19:21:31 +0000
commitbc20ce971235dfa09ed849d92bb51d5928a8be66 (patch)
tree0e1cc2bb3316f4bedfc377ed68c89dc8f3d9afec /TAO/tao/Object.i
parent8f101f03a5f72294c838c3388638a61a789d0c47 (diff)
downloadATCD-bc20ce971235dfa09ed849d92bb51d5928a8be66.tar.gz
ChangeLogTag:Tue Jul 21 14:19:28 1998 Carlos O'Ryan <coryan@cs.wustl.edu>
Diffstat (limited to 'TAO/tao/Object.i')
-rw-r--r--TAO/tao/Object.i14
1 files changed, 10 insertions, 4 deletions
diff --git a/TAO/tao/Object.i b/TAO/tao/Object.i
index db51f7d3b0c..84a18d095ff 100644
--- a/TAO/tao/Object.i
+++ b/TAO/tao/Object.i
@@ -5,14 +5,20 @@
ACE_INLINE CORBA::ULong
CORBA_Object::_incr_refcnt (void)
{
- return ++this->refcount_;
+ ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, guard, this->refcount_lock_, 0);
+ return this->refcount_++;
}
ACE_INLINE CORBA::ULong
CORBA_Object::_decr_refcnt (void)
{
- if (--this->refcount_ != 0)
- return this->refcount_;
+ {
+ ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, mon, this->refcount_lock_, 0);
+ this->refcount_--;
+ if (this->refcount_ != 0)
+ return this->refcount_;
+ }
+
delete this;
return 0;
}
@@ -36,7 +42,7 @@ CORBA_Object::_nil (void)
ACE_INLINE CORBA::Boolean
CORBA::is_nil (CORBA::Object_ptr obj)
{
- return (CORBA::Boolean) (obj == 0);
+ return obj == 0;
}
ACE_INLINE STUB_Object *