21 #ifndef __TBB_spin_mutex_H 22 #define __TBB_spin_mutex_H 40 class spin_mutex : internal::mutex_copy_deprecated_and_disabled {
48 #if TBB_USE_THREADING_TOOLS 83 #if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT 94 #if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT 105 #if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT 117 #if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT 128 #if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT 149 #if TBB_USE_THREADING_TOOLS 160 #if TBB_USE_THREADING_TOOLS 170 #if TBB_USE_THREADING_TOOLS 174 s.internal_release();
187 #if ( __TBB_x86_32 || __TBB_x86_64 ) 203 #if ( __TBB_x86_32 || __TBB_x86_64 ) 204 typedef interface7::internal::padded_mutex<interface7::internal::x86_eliding_mutex,false>
speculative_spin_mutex;
static const bool is_fair_mutex
void __TBB_EXPORTED_METHOD internal_acquire(spin_mutex &m)
Like acquire, but with ITT instrumentation.
__TBB_atomic __TBB_Flag __TBB_atomic_flag
bool __TBB_TryLockByte(__TBB_atomic_flag &flag)
T * begin() const
Pointer to beginning of array.
spin_mutex * my_mutex
Points to currently held mutex, or NULL if no lock is held.
void suppress_unused_warning(const T1 &)
Utility template function to prevent "unused" warnings by various compilers.
void release()
Release lock.
scoped_lock()
Construct without acquiring a mutex.
void acquire(spin_mutex &m)
Acquire lock.
interface7::internal::padded_mutex< spin_mutex, false > speculative_spin_mutex
A cross-platform spin mutex with speculative lock acquisition.
void unlock()
Release lock.
A lock that occupies a single byte.
static const bool is_rw_mutex
#define __TBB_EXPORTED_METHOD
spin_mutex()
Construct unacquired lock.
__TBB_Flag my_unlock_value
Value to store into spin_mutex::flag to unlock the mutex.
#define __TBB_DEFINE_PROFILING_SET_NAME(sync_object_type)
void __TBB_EXPORTED_METHOD internal_construct()
Internal constructor with ITT instrumentation.
Represents acquisition of a mutex.
bool try_lock()
Try acquiring lock (non-blocking)
void __TBB_EXPORTED_METHOD internal_release()
Like release, but with ITT instrumentation.
void const char const char int ITT_FORMAT __itt_group_sync s
static const bool is_recursive_mutex
bool try_acquire(spin_mutex &m)
Try acquiring lock (non-blocking)
bool __TBB_EXPORTED_METHOD internal_try_acquire(spin_mutex &m)
Like try_acquire, but with ITT instrumentation.
__TBB_Flag __TBB_LockByte(__TBB_atomic_flag &flag)
Block of space aligned sufficiently to construct an array T with N elements.
scoped_lock(spin_mutex &m)
Construct and acquire lock on a mutex.
__TBB_atomic_flag flag
0 if lock is released, 1 if lock is acquired.
~scoped_lock()
Destroy lock. If holding a lock, releases the lock first.