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