| /oneTBB/include/oneapi/tbb/ |
| H A D | mutex.h | 31 class mutex { 34 mutex() { in mutex() function 39 ~mutex() = default; 42 mutex(const mutex&) = delete; 43 mutex& operator=(const mutex&) = delete; 45 using scoped_lock = unique_scoped_lock<mutex>; 88 using detail::d1::mutex;
|
| /oneTBB/examples/parallel_for/tachyon/src/ |
| H A D | pthread.cpp | 127 int pthread_mutex_init(pthread_mutex_t *mutex, pthread_mutexattr_t *mutex_attr) { in pthread_mutex_init() argument 128 InitializeCriticalSection(&mutex->critsec); in pthread_mutex_init() 132 int pthread_mutex_destroy(pthread_mutex_t *mutex) { in pthread_mutex_destroy() argument 136 int pthread_mutex_lock(pthread_mutex_t *mutex) { in pthread_mutex_lock() argument 137 EnterCriticalSection(&mutex->critsec); in pthread_mutex_lock() 141 int pthread_mutex_unlock(pthread_mutex_t *mutex) { in pthread_mutex_unlock() argument 142 LeaveCriticalSection(&mutex->critsec); in pthread_mutex_unlock()
|
| H A D | pthread_w.hpp | 101 extern int pthread_mutex_init(pthread_mutex_t *mutex, pthread_mutexattr_t *mutex_attr); 102 extern int pthread_mutex_destroy(pthread_mutex_t *mutex); 103 extern int pthread_mutex_lock(pthread_mutex_t *mutex); 104 extern int pthread_mutex_unlock(pthread_mutex_t *mutex);
|
| /oneTBB/include/oneapi/tbb/detail/ |
| H A D | _mutex_common.h | 33 requires( Lock& lock, Mutex& mutex ) { in requires() argument 34 lock.acquire(mutex); in requires() 35 { lock.try_acquire(mutex) } -> adaptive_same_as<bool>; in requires() 42 requires( Lock& lock, Mutex& mutex ) { in requires() argument 43 lock.acquire(mutex, false); in requires() 44 { lock.try_acquire(mutex, false) } -> adaptive_same_as<bool>; in requires()
|
| /oneTBB/doc/main/reference/ |
| H A D | custom_mutex_chmap.rst | 3 The customizing mutex type for ``concurrent_hash_map`` 16 oneTBB ``concurrnent_hash_map`` class uses reader-writer mutex 18 for ``concurrent_hash_map`` that allows to customize the type of the reader-writer mutex. 52 The type of the mutex passed as a template argument for ``concurrent_hash_map`` should 58 **Returns**: ``true`` if the ``scoped_lock`` object acquires the mutex as a writer, ``false`` other… 60 The behavior is undefined if the ``scoped_lock`` object does not acquire the mutex. 68 of `ReaderWriterMutex` and how to customize ``concurrent_hash_map`` to use this mutex. 87 scoped_lock(SharedMutexWrapper& mutex, bool write = true) 88 : my_mutex_ptr(&mutex), my_writer_flag(write) 101 void acquire(SharedMutexWrapper& mutex, bool write = true) { [all …]
|
| /oneTBB/doc/main/tbb_userguide/ |
| H A D | Mutex_Flavors.rst | 16 thread at a time. A *scalable mutex* is one that does not do *worse* 17 than this. A mutex can do worse than serialize execution if the 21 light contention, so a non-scalable mutex may be better. When in 22 doubt, use a scalable mutex. 25 - **Fair**. Mutexes can be *fair* or *unfair*. A fair mutex lets 35 mutex either *yields* or *blocks*. Here *yields* means to 43 The following is a summary of mutex behaviors: 56 - ``mutex`` has behavior similar to the ``spin_mutex``. However, 57 the ``mutex`` *blocks* on long waits that makes it 70 - ``rw_mutex`` is similar to ``mutex``, but additionally support [all …]
|
| H A D | Mutual_Exclusion.rst | 9 exclusion is implemented by *mutexes* and *locks.* A mutex is an object 11 a lock on a mutex; other threads have to wait their turn. 14 The simplest mutex is ``spin_mutex``. A thread trying to acquire a lock 17 instructions. For example, the following code uses a mutex 89 Method ``acquire`` waits until it can acquire a lock on the mutex; 98 why there are not simply acquire and release methods on the mutex object 112 of the mutexes have a nested ``scoped_lock`` type, so given a mutex of 117 It is recommended that you always use a ``typedef`` for the mutex
|
| H A D | Lock_Pathologies.rst | 25 - Each thread holds at least one lock on a mutex, and is waiting on 26 a mutex for which the *next* thread in the cycle already has a 48 if the locks are unnamed, acquire locks in order of the mutex’s
|
| /oneTBB/src/tbb/tools_api/ |
| H A D | ittnotify_static.c | 367 __itt_mutex_unlock(&_N_(_ittapi_global).mutex); in ITT_VERSIONIZE() 372 __itt_mutex_unlock(&_N_(_ittapi_global).mutex); in ITT_VERSIONIZE() 409 __itt_mutex_unlock(&_N_(_ittapi_global).mutex); in ITT_VERSIONIZE() 422 __itt_mutex_unlock(&_N_(_ittapi_global).mutex); in ITT_VERSIONIZE() 491 __itt_mutex_unlock(&_N_(_ittapi_global).mutex); in ITT_VERSIONIZE() 511 __itt_mutex_unlock(&_N_(_ittapi_global).mutex); in ITT_VERSIONIZE() 606 __itt_mutex_unlock(&_N_(_ittapi_global).mutex); in ITT_VERSIONIZE() 702 __itt_mutex_unlock(&_N_(_ittapi_global).mutex); in ITT_VERSIONIZE() 796 __itt_mutex_unlock(&_N_(_ittapi_global).mutex); in ITT_VERSIONIZE() 891 __itt_mutex_unlock(&_N_(_ittapi_global).mutex); in ITT_VERSIONIZE() [all …]
|
| H A D | ittnotify_config.h | 279 #define __itt_mutex_init(mutex) InitializeCriticalSection(mutex) argument 280 #define __itt_mutex_lock(mutex) EnterCriticalSection(mutex) argument 281 #define __itt_mutex_unlock(mutex) LeaveCriticalSection(mutex) argument 282 #define __itt_mutex_destroy(mutex) DeleteCriticalSection(mutex) argument 312 #define __itt_mutex_init(mutex) {\ argument 323 error_code = pthread_mutex_init(mutex, &mutex_attr); \ 332 #define __itt_mutex_lock(mutex) pthread_mutex_lock(mutex) argument 333 #define __itt_mutex_unlock(mutex) pthread_mutex_unlock(mutex) argument 334 #define __itt_mutex_destroy(mutex) pthread_mutex_destroy(mutex) argument 510 mutex_t mutex; member
|
| /oneTBB/test/conformance/ |
| H A D | conformance_mutex.h | 39 typename M::scoped_lock lock(counter.mutex); 45 lock.acquire(counter.mutex); 124 M mutex; member 192 typename M::scoped_lock lock(counter.mutex, write); in TestReaderWriterLock() 198 lock.acquire(counter.mutex, write); in TestReaderWriterLock() 212 M mutex; in TestRWStateMultipleChange() local 214 typename M::scoped_lock l(mutex, /*write=*/false); in TestRWStateMultipleChange() 328 typename C::mutex_type::scoped_lock lock2(counter.mutex); in recurse_till() 333 lock2.acquire(counter.mutex); in recurse_till() 339 typename C::mutex_type::scoped_lock lock(counter.mutex); in operator()
|
| H A D | conformance_mutex.cpp | 43 GeneralTest<oneapi::tbb::mutex>("Adaptive Mutex"); 65 TestTryAcquire<oneapi::tbb::mutex>("Adaptive Mutex"); 102 GeneralTest<TBB_MutexFromISO_Mutex<oneapi::tbb::mutex> >("ISO Adaprive Mutex"); 106 TestTryAcquire<TBB_MutexFromISO_Mutex<oneapi::tbb::mutex> >("ISO Adaptive Mutex");
|
| /oneTBB/test/tbb/ |
| H A D | test_mutex.h | 33 M mutex; member 40 typename mutex_type::scoped_lock lock(mutex); in flog_once() 46 lock.acquire(mutex); in flog_once() 56 M mutex; member 94 typename mutex_type::scoped_lock lock(mutex, write); in flog_once() 121 lock.acquire(mutex, write); in flog_once()
|
| H A D | test_resumable_tasks.cpp | 50 std::lock_guard<std::mutex> lock(m_mutex); in ~AsyncActivity() 63 std::lock_guard<std::mutex> lock(m_mutex); in submit() 73 std::unique_lock<std::mutex> lock(async->m_mutex); in asyncLoop() 86 std::mutex m_mutex; 198 std::lock_guard<std::mutex> lock(m_mutex); in ~EpochAsyncActivity() 211 std::lock_guard<std::mutex> lock(m_mutex); in submit() 221 std::unique_lock<std::mutex> lock(async->m_mutex); in asyncLoop() 237 std::mutex m_mutex;
|
| H A D | test_profiling.cpp | 40 Mutex mutex; variable 41 tbb::profiling::set_name(mutex, "mutex"); 54 Mutex mutex; variable 55 tbb::profiling::set_name(mutex, L"mutex");
|
| H A D | test_mutex.cpp | 85 typename C::mutex_type::scoped_lock lock(counter.mutex); in operator ()() 154 test_with_native_threads::test<tbb::mutex>(); 194 …static_assert(mutexes<tbb::spin_mutex, oneapi::tbb::mutex, tbb::speculative_spin_mutex, tbb::null_…
|
| /oneTBB/src/tbb/ |
| H A D | thread_data.h | 59 d1::mutex m_mutex{}; 67 mutex::scoped_lock lock(m_mutex); in remove() 78 mutex::scoped_lock lock(m_mutex); in push_front() 84 mutex::scoped_lock lock(m_mutex); in orphan() 240 mutex::scoped_lock lock(my_context_list->m_mutex); in propagate_task_group_state()
|
| H A D | observer_proxy.cpp | 55 scoped_lock lock(mutex(), /*is_writer=*/true); in clear() 81 scoped_lock lock(mutex(), /*is_writer=*/false); in clear() 91 scoped_lock lock(mutex(), /*is_writer=*/true); in insert() 134 observer_list::scoped_lock lock(mutex(), /*is_writer=*/true); in remove_ref() 153 scoped_lock lock(mutex(), /*is_writer=*/false); in do_notify_entry_observers() 214 scoped_lock lock(mutex(), /*is_writer=*/false); in do_notify_exit_observers() 303 observer_list::scoped_lock lock(list.mutex(), /*is_writer=*/true); in observe()
|
| H A D | co_context.h | 81 std::mutex my_mutex; 177 std::unique_lock<std::mutex> lock(c.my_mutex); in coroutine_thread_func() 225 std::unique_lock<std::mutex> lock(c.my_mutex); in create_coroutine() 248 std::unique_lock<std::mutex> lock(new_coroutine.my_mutex); in swap_coroutine() 257 std::unique_lock<std::mutex> lock(prev_coroutine.my_mutex); in swap_coroutine() 265 std::unique_lock<std::mutex> lock(c.my_mutex); in destroy_coroutine()
|
| H A D | task_stream.h | 122 using lane_t = queue_and_mutex <d1::task*, mutex>; 133 using lane_t = queue_and_mutex <d1::task*, mutex>; 212 mutex::scoped_lock lock; in pop_specific() 235 mutex::scoped_lock lock; in try_push() 250 mutex::scoped_lock lock; in try_pop()
|
| H A D | concurrent_monitor_mutex.h | 93 std::lock_guard<std::mutex> lock(my_init_mutex); in get_semaphore() 103 static std::mutex my_init_mutex;
|
| /oneTBB/examples/test_all/fibonacci/ |
| H A D | fibonacci.cpp | 163 M &mutex; member in SharedSerialFibBody 166 SharedSerialFibBody(M &m) : mutex(m) {} in SharedSerialFibBody() 170 typename M::scoped_lock lock(mutex); in operator ()() 182 void SharedSerialFibBody<std::mutex>::operator()( in operator ()() 185 std::lock_guard<std::mutex> lock(mutex); in operator ()() 202 M mutex; in SharedSerialFib() local 203 parallel_for(oneapi::tbb::blocked_range<int>(0, 4, 1), SharedSerialFibBody<M>(mutex)); in SharedSerialFib() 479 sum = Measure("Shared serial (mutex)\t", SharedSerialFib<std::mutex>, NumbersCount); in main()
|
| /oneTBB/test/common/ |
| H A D | utils_report.h | 145 static std::mutex mutex; in print_call_stack() local 146 std::lock_guard<std::mutex> lock(mutex); in print_call_stack()
|
| H A D | concurrency_tracker.h | 96 static std::mutex global_mutex; 146 std::lock_guard<std::mutex> lock(global_mutex); 168 std::mutex ExactConcurrencyLevel::global_mutex;
|
| /oneTBB/python/tbb/ |
| H A D | api.i | 78 std::mutex m; 97 std::unique_lock<std::mutex> lock(b.m); 103 std::unique_lock<std::mutex> lock(b.m);
|