19#ifndef HAVE_REMUTEXTRUEIMPL
20 : _cvar_impl(_lock_impl)
23#ifndef HAVE_REMUTEXTRUEIMPL
24 _locking_thread =
nullptr;
35 TAU_PROFILE(
"void ReMutexDirect::acquire()",
" ", TAU_USER);
36#ifdef HAVE_REMUTEXTRUEIMPL
39 ((ReMutexDirect *)
this)->do_lock();
49 TAU_PROFILE(
"void ReMutexDirect::try_acquire()",
" ", TAU_USER);
50#ifdef HAVE_REMUTEXTRUEIMPL
51 return _impl.try_lock();
53 return ((ReMutexDirect *)
this)->do_try_lock();
63 TAU_PROFILE(
"void ReMutexDirect::unlock()",
" ", TAU_USER);
64#ifdef HAVE_REMUTEXTRUEIMPL
67 ((ReMutexDirect *)
this)->do_unlock();
83 TAU_PROFILE(
"void ReMutexDirect::acquire()",
" ", TAU_USER);
84#ifdef HAVE_REMUTEXTRUEIMPL
87 ((ReMutexDirect *)
this)->do_lock();
97 TAU_PROFILE(
"void ReMutexDirect::acquire(Thread *)",
" ", TAU_USER);
98#ifdef HAVE_REMUTEXTRUEIMPL
101 ((ReMutexDirect *)
this)->do_lock(current_thread);
111 TAU_PROFILE(
"void ReMutexDirect::acquire(bool)",
" ", TAU_USER);
112#ifdef HAVE_REMUTEXTRUEIMPL
113 return _impl.try_lock();
115 return ((ReMutexDirect *)
this)->do_try_lock();
125 TAU_PROFILE(
"void ReMutexDirect::acquire(bool)",
" ", TAU_USER);
126#ifdef HAVE_REMUTEXTRUEIMPL
127 return _impl.try_lock();
129 return ((ReMutexDirect *)
this)->do_try_lock(current_thread);
145 TAU_PROFILE(
"void ReMutexDirect::elevate_lock()",
" ", TAU_USER);
146#ifdef HAVE_REMUTEXTRUEIMPL
149 ((ReMutexDirect *)
this)->do_elevate_lock();
162 TAU_PROFILE(
"void ReMutexDirect::release()",
" ", TAU_USER);
163#ifdef HAVE_REMUTEXTRUEIMPL
166 ((ReMutexDirect *)
this)->do_unlock();
208 return std::string();
211#ifndef HAVE_REMUTEXTRUEIMPL
218INLINE
void ReMutexDirect::
224#ifndef HAVE_REMUTEXTRUEIMPL
231INLINE
bool ReMutexDirect::
std::string get_name() const
The mutex name is only defined when compiling in DEBUG_THREADS mode.
bool try_lock()
Alias for try_acquire() to match C++11 semantics.
void acquire() const
Grabs the reMutex if it is available.
bool debug_is_locked() const
Returns true if the current thread has locked the ReMutex, false otherwise.
void unlock()
Alias for release() to match C++11 semantics.
bool has_name() const
The mutex name is only defined when compiling in DEBUG_THREADS mode.
void clear_name()
The mutex name is only defined when compiling in DEBUG_THREADS mode.
void elevate_lock() const
This method increments the lock count, assuming the calling thread already holds the lock.
void release() const
Releases the reMutex.
void lock()
Alias for acquire() to match C++11 semantics.
bool try_acquire() const
Returns immediately, with a true value indicating the mutex has been acquired, and false indicating i...
void set_name(const std::string &name)
The mutex name is only defined when compiling in DEBUG_THREADS mode.
A thread; that is, a lightweight process.
get_current_thread
Returns a pointer to the currently-executing Thread object.