Intel(R) Threading Building Blocks Doxygen Documentation
version 4.2.3
|
Go to the documentation of this file.
17 #ifndef __TBB_spin_mutex_H
18 #define __TBB_spin_mutex_H
20 #define __TBB_spin_mutex_H_include_area
47 #if TBB_USE_THREADING_TOOLS
82 #if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT
93 #if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT
104 #if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT
116 #if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT
127 #if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT
148 #if TBB_USE_THREADING_TOOLS
149 aligned_space<scoped_lock> tmp;
159 #if TBB_USE_THREADING_TOOLS
160 aligned_space<scoped_lock> tmp;
161 return (
new(tmp.begin())
scoped_lock)->internal_try_acquire(*
this);
169 #if TBB_USE_THREADING_TOOLS
170 aligned_space<scoped_lock> tmp;
173 s.internal_release();
186 #if ( __TBB_x86_32 || __TBB_x86_64 )
202 #if ( __TBB_x86_32 || __TBB_x86_64 )
203 typedef interface7::internal::padded_mutex<interface7::internal::x86_eliding_mutex,false>
speculative_spin_mutex;
212 #undef __TBB_spin_mutex_H_include_area
__TBB_Flag my_unlock_value
Value to store into spin_mutex::flag to unlock the mutex.
bool __TBB_EXPORTED_METHOD internal_try_acquire(spin_mutex &m)
Like try_acquire, but with ITT instrumentation.
void unlock()
Release lock.
void acquire(spin_mutex &m)
Acquire lock.
scoped_lock()
Construct without acquiring a mutex.
__TBB_Flag __TBB_LockByte(__TBB_atomic_flag &flag)
static const bool is_rw_mutex
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.
Represents acquisition of a mutex.
static const bool is_recursive_mutex
spin_mutex * my_mutex
Points to currently held mutex, or NULL if no lock is held.
static const bool is_fair_mutex
~scoped_lock()
Destroy lock. If holding a lock, releases the lock first.
void release()
Release lock.
void __TBB_EXPORTED_METHOD internal_acquire(spin_mutex &m)
Like acquire, but with ITT instrumentation.
bool __TBB_TryLockByte(__TBB_atomic_flag &flag)
void __TBB_EXPORTED_METHOD internal_construct()
Internal constructor with ITT instrumentation.
bool try_lock()
Try acquiring lock (non-blocking)
bool try_acquire(spin_mutex &m)
Try acquiring lock (non-blocking)
Base class for types that should not be copied or assigned.
void const char const char int ITT_FORMAT __itt_group_sync s
void suppress_unused_warning(const T1 &)
Utility template function to prevent "unused" warnings by various compilers.
__TBB_atomic __TBB_Flag __TBB_atomic_flag
spin_mutex()
Construct unacquired lock.
interface7::internal::padded_mutex< spin_mutex, false > speculative_spin_mutex
A cross-platform spin mutex with speculative lock acquisition.
#define __TBB_DEFINE_PROFILING_SET_NAME(sync_object_type)
#define __TBB_EXPORTED_METHOD
A lock that occupies a single byte.
void __TBB_EXPORTED_METHOD internal_release()
Like release, but with ITT instrumentation.
Copyright © 2005-2020 Intel Corporation. All Rights Reserved.
Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are
registered trademarks or trademarks of Intel Corporation or its
subsidiaries in the United States and other countries.
* Other names and brands may be claimed as the property of others.