diff options
author | cleeland <cleeland@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-04-23 01:47:23 +0000 |
---|---|---|
committer | cleeland <cleeland@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-04-23 01:47:23 +0000 |
commit | 1741649f404eb44495785a7b1b19bba270093d40 (patch) | |
tree | 07c2167f99417177c35e145ef7c204d2c183e389 /TAO/IIOP/lib/request.cpp | |
parent | 35947311a76dd57f4467449633017d52ba45ae05 (diff) | |
download | ATCD-1741649f404eb44495785a7b1b19bba270093d40.tar.gz |
Swept through and hopefully removed the last of the Pthreads stuff
from code. Cross ye fingers!
Diffstat (limited to 'TAO/IIOP/lib/request.cpp')
-rw-r--r-- | TAO/IIOP/lib/request.cpp | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/TAO/IIOP/lib/request.cpp b/TAO/IIOP/lib/request.cpp index 0ea1aa2a008..26011a047c2 100644 --- a/TAO/IIOP/lib/request.cpp +++ b/TAO/IIOP/lib/request.cpp @@ -18,37 +18,30 @@ DEFINE_GUID (IID_CORBA_Request, 0x77420085, 0xf276, 0x11ce, 0x95, 0x98, 0x0, 0x0, 0xc0, 0x7c, 0xa8, 0x98); -#ifdef _POSIX_THREADS -static pthread_mutex_t refcnt_lock = PTHREAD_MUTEX_INITIALIZER; -#endif // _POSIX_THREADS - - ULONG __stdcall CORBA_Request::AddRef () { -#ifdef _POSIX_THREADS - Critical region (&refcnt_lock); -#endif + ACE_GUARD_RETURN(ACE_Thread_Mutex, guard, lock_, 0); - return _refcount++; + return _refcount++; } ULONG __stdcall CORBA_Request::Release () { -#ifdef _POSIX_THREADS - Critical region (&refcnt_lock); -#endif + ACE_GUARD_RETURN(ACE_Thread_Mutex, guard, lock_, 0); - assert (this != 0); + assert (this != 0); - if (--_refcount != 0) - return _refcount; + if (--_refcount != 0) + return _refcount; + + guard.release(); - delete this; - return 0; + delete this; + return 0; } HRESULT |