diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1999-02-19 21:44:14 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1999-02-19 21:44:14 +0000 |
commit | ccc3a77777a5f20f08ba829da6d9f5d6f0a5dd50 (patch) | |
tree | 65e832a44b9c7be70fe7104331ef40ee60886371 /ace/Synch.i | |
parent | 2b1d8453c79c1220c74566f18f9a53fc8756360c (diff) | |
download | ATCD-ccc3a77777a5f20f08ba829da6d9f5d6f0a5dd50.tar.gz |
.
Diffstat (limited to 'ace/Synch.i')
-rw-r--r-- | ace/Synch.i | 44 |
1 files changed, 7 insertions, 37 deletions
diff --git a/ace/Synch.i b/ace/Synch.i index 768a4a724c7..46b12429bd2 100644 --- a/ace/Synch.i +++ b/ace/Synch.i @@ -629,7 +629,6 @@ ACE_Recursive_Thread_Mutex::~ACE_Recursive_Thread_Mutex (void) // ACE_TRACE ("ACE_Recursive_Thread_Mutex::~ACE_Recursive_Thread_Mutex"); } -#if !defined (ACE_WIN32) ACE_INLINE int ACE_Recursive_Thread_Mutex::remove (void) { @@ -638,8 +637,7 @@ ACE_Recursive_Thread_Mutex::remove (void) if (this->removed_ == 0) { this->removed_ = 1; - this->nesting_mutex_.remove (); - result = this->lock_available_.remove (); + result = ACE_OS::recursive_mutex_destroy (&this->recursive_mutex_); } return result; } @@ -648,68 +646,40 @@ ACE_INLINE void ACE_Recursive_Thread_Mutex::set_thread_id (ACE_thread_t t) { // ACE_TRACE ("ACE_Recursive_Thread_Mutex::set_thread_id"); - this->owner_id_ = t; + this->recursive_mutex_.owner_id_ = t; } ACE_INLINE int ACE_Recursive_Thread_Mutex::acquire_read (void) { - return acquire (); + return this->acquire (); } ACE_INLINE int ACE_Recursive_Thread_Mutex::acquire_write (void) { - return acquire (); + return this->acquire (); } ACE_INLINE int ACE_Recursive_Thread_Mutex::tryacquire_read (void) { - return tryacquire (); + return this->tryacquire (); } ACE_INLINE int ACE_Recursive_Thread_Mutex::tryacquire_write (void) { - return tryacquire (); -} - -#else /* ACE_WIN32 */ -// The counter part of the following two functions for non-Win32 platforms -// are located in file Synch.cpp -ACE_INLINE ACE_thread_t -ACE_Recursive_Thread_Mutex::get_thread_id (void) -{ - // @@ The structure CriticalSection in Win32 doesn't hold - // the thread handle of the thread that owns the lock. However - // it is still not clear at this point how to translate a - // thread handle to its corresponding thread id. - errno = ENOTSUP; - return ACE_OS::NULL_thread; -} - -ACE_INLINE int -ACE_Recursive_Thread_Mutex::get_nesting_level (void) -{ -#if defined (ACE_HAS_WINCE) - errno = ENOTSUP; - return -1; // @@ Is this the right value to return? -#else - return this->lock_.RecursionCount; -#endif /* ! ACE_HAS_WINCE */ + return this->tryacquire (); } -#endif /* ACE_WIN32 */ - #endif /* ACE_HAS_THREADS */ // Explicitly destroy the mutex. ACE_INLINE int ACE_Process_Mutex::remove (void) { - int retv = this->lock_.remove (); - return retv; + return this->lock_.remove (); } // Acquire lock ownership (wait on priority queue if necessary). |