17 #ifndef __TBB__x86_eliding_mutex_impl_H
18 #define __TBB__x86_eliding_mutex_impl_H
20 #ifndef __TBB_spin_mutex_H
21 #error Do not #include this internal file directly; use public TBB headers instead.
24 #if ( __TBB_x86_32 || __TBB_x86_64 )
27 namespace interface7 {
30 template<
typename Mutex,
bool is_rw>
44 friend class padded_mutex<x86_eliding_mutex, false>;
49 x86_eliding_mutex() : flag(0) {}
53 #if __TBB_USE_X86_ELIDING_MUTEX || __TBB_GCC_VERSION < 40000
65 x86_eliding_mutex* my_mutex;
75 void acquire( x86_eliding_mutex& m ) {
84 bool try_acquire( x86_eliding_mutex& m ) {
87 bool result = m.try_lock();
96 __TBB_ASSERT( my_mutex,
"release on scoped_lock that is not holding a lock" );
109 #if __TBB_USE_X86_ELIDING_MUTEX || __TBB_GCC_VERSION < 40000
123 __TBB_LockByteElided(flag);
129 return __TBB_TryLockByteElided(flag);
134 __TBB_UnlockByteElided( flag );
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
static const bool is_recursive_mutex
Base class for types that should not be copied or assigned.
__TBB_atomic __TBB_Flag __TBB_atomic_flag
static const bool is_rw_mutex
static const bool is_fair_mutex
bool try_lock()
Try acquiring lock (non-blocking)
void unlock()
Release lock.