| /oneTBB/include/oneapi/tbb/ |
| H A D | queuing_rw_mutex.h | 61 class scoped_lock { 78 scoped_lock() {initialize();} in scoped_lock() function 81 scoped_lock( queuing_rw_mutex& m, bool write=true ) { 87 ~scoped_lock() { in ~scoped_lock() 92 scoped_lock(const scoped_lock&) = delete; 93 scoped_lock& operator=(const scoped_lock&) = delete; 141 std::atomic<scoped_lock*> q_tail{nullptr}; 163 TBB_EXPORT void release(d1::queuing_rw_mutex::scoped_lock&); 180 inline void queuing_rw_mutex::scoped_lock::release() { in release() 184 inline bool queuing_rw_mutex::scoped_lock::upgrade_to_writer() { in upgrade_to_writer() [all …]
|
| H A D | queuing_mutex.h | 48 class scoped_lock { 57 scoped_lock() = default; 60 scoped_lock(queuing_mutex& m) { in scoped_lock() function 65 ~scoped_lock() { in ~scoped_lock() 70 scoped_lock( const scoped_lock& ) = delete; 71 scoped_lock& operator=( const scoped_lock& ) = delete; 85 scoped_lock* pred = m.q_tail.exchange(this); in acquire() 106 scoped_lock* expected = nullptr; in try_acquire() 127 scoped_lock* expected = this; in release() 146 std::atomic<scoped_lock*> m_next{nullptr}; [all …]
|
| H A D | null_mutex.h | 44 class scoped_lock { 47 constexpr scoped_lock() noexcept = default; 48 scoped_lock(null_mutex&) {} in scoped_lock() function 51 ~scoped_lock() = default; 54 scoped_lock(const scoped_lock&) = delete; 55 scoped_lock& operator=(const scoped_lock&) = delete;
|
| H A D | null_rw_mutex.h | 44 class scoped_lock { 47 constexpr scoped_lock() noexcept = default; 48 scoped_lock(null_rw_mutex&, bool = true) {} 51 ~scoped_lock() = default; 54 scoped_lock(const scoped_lock&) = delete; 55 scoped_lock& operator=(const scoped_lock&) = delete;
|
| /oneTBB/include/oneapi/tbb/detail/ |
| H A D | _rtm_rw_mutex.h | 64 class scoped_lock { in alignas() 77 ~scoped_lock() { in alignas() 84 scoped_lock(const scoped_lock&) = delete; in alignas() 85 scoped_lock& operator=(const scoped_lock&) = delete; in alignas() 132 TBB_EXPORT bool __TBB_EXPORTED_FUNC upgrade(d1::rtm_rw_mutex::scoped_lock&); 145 void rtm_rw_mutex::scoped_lock::acquire(rtm_rw_mutex& m, bool write) { in acquire() 155 bool rtm_rw_mutex::scoped_lock::try_acquire(rtm_rw_mutex& m, bool write) { in try_acquire() 165 void rtm_rw_mutex::scoped_lock::release() { in release() 173 bool rtm_rw_mutex::scoped_lock::upgrade_to_writer() { in upgrade_to_writer() 182 bool rtm_rw_mutex::scoped_lock::downgrade_to_reader() { in downgrade_to_reader() [all …]
|
| H A D | _rtm_mutex.h | 61 class scoped_lock { in alignas() 66 constexpr scoped_lock() : m_mutex(nullptr), m_transaction_state(rtm_state::rtm_none) {} in alignas() 69 scoped_lock(rtm_mutex& m) : m_mutex(nullptr), m_transaction_state(rtm_state::rtm_none) { in alignas() 74 ~scoped_lock() { in alignas() 81 scoped_lock(const scoped_lock&) = delete; in alignas() 82 scoped_lock& operator=(const scoped_lock&) = delete; in alignas() 113 TBB_EXPORT bool __TBB_EXPORTED_FUNC try_acquire(d1::rtm_mutex&, d1::rtm_mutex::scoped_lock&); 115 TBB_EXPORT void __TBB_EXPORTED_FUNC release(d1::rtm_mutex::scoped_lock&); 120 inline void rtm_mutex::scoped_lock::acquire(rtm_mutex& m) { in acquire() 126 inline bool rtm_mutex::scoped_lock::try_acquire(rtm_mutex& m) { in try_acquire() [all …]
|
| H A D | _flow_graph_cache_impl.h | 34 typename mutex_type::scoped_lock lock( my_mutex ); in empty() 39 typename mutex_type::scoped_lock lock( my_mutex ); in add() 44 typename mutex_type::scoped_lock lock( my_mutex ); in remove() 108 typename mutex_type::scoped_lock lock(this->my_mutex); in get_item() 243 typename mutex_type::scoped_lock l(my_mutex, true); in register_successor() 251 typename mutex_type::scoped_lock l(my_mutex, true); in remove_successor() 262 typename mutex_type::scoped_lock l(my_mutex, false); in empty() 296 typename mutex_type::scoped_lock l(my_mutex, true); in register_successor() 308 typename mutex_type::scoped_lock l(my_mutex, true); in remove_successor() 321 typename mutex_type::scoped_lock l(my_mutex, false); in empty() [all …]
|
| H A D | _mutex_common.h | 50 concept scoped_lockable = mutex_scoped_lock<typename Mutex::scoped_lock, Mutex>; 54 rw_mutex_scoped_lock<typename Mutex::scoped_lock, Mutex>;
|
| /oneTBB/src/tbbmalloc/ |
| H A D | Synchronize.h | 48 class scoped_lock : tbb::detail::no_copy { 53 scoped_lock(MallocMutex& m) : m_mutex(m), m_taken(true) { in scoped_lock() function 56 scoped_lock(MallocMutex& m, bool block, bool *locked) : m_mutex(m), m_taken(false) { in scoped_lock() function 66 scoped_lock(scoped_lock& other) = delete; 67 scoped_lock& operator=(scoped_lock&) = delete; 69 ~scoped_lock() { in ~scoped_lock() 75 friend class scoped_lock; variable
|
| /oneTBB/test/conformance/ |
| H A D | conformance_mutex.h | 39 typename M::scoped_lock lock(counter.mutex); 44 typename M::scoped_lock lock; 58 typename M::scoped_lock lock_outer; in TestTryAcquire() 65 typename M::scoped_lock lock_inner(tested_mutex); in TestTryAcquire() 88 typename M::scoped_lock lock_outer; in TestTryAcquireReader() 197 typename M::scoped_lock lock; in TestReaderWriterLock() 232 class scoped_lock; variable 233 friend class scoped_lock; variable 235 class scoped_lock { 310 ~scoped_lock() { in ~scoped_lock() [all …]
|
| /oneTBB/src/tbb/ |
| H A D | queuing_rw_mutex.cpp | 272 d1::queuing_rw_mutex::scoped_lock* expected = nullptr; in try_acquire() 281 static void release(d1::queuing_rw_mutex::scoped_lock& s) { in release() 294 d1::queuing_rw_mutex::scoped_lock* expected = &s; in release() 339 queuing_rw_mutex::scoped_lock *tmp = nullptr; in release() 367 d1::queuing_rw_mutex::scoped_lock* expected = &s; in release() 388 d1::queuing_rw_mutex::scoped_lock* expected = &s; in release() 464 queuing_rw_mutex::scoped_lock* tmp{}; in upgrade_to_writer() 465 queuing_rw_mutex::scoped_lock* me = &s; in upgrade_to_writer() 473 d1::queuing_rw_mutex::scoped_lock* expected = &s; in upgrade_to_writer() 476 queuing_rw_mutex::scoped_lock * next; in upgrade_to_writer() [all …]
|
| H A D | rtm_rw_mutex.cpp | 37 static void release(d1::rtm_rw_mutex::scoped_lock& s) { in release() 66 …static void acquire_writer(d1::rtm_rw_mutex& m, d1::rtm_rw_mutex::scoped_lock& s, bool only_specul… in acquire_writer() 151 static bool upgrade(d1::rtm_rw_mutex::scoped_lock& s) { in upgrade() 180 static bool downgrade(d1::rtm_rw_mutex::scoped_lock& s) { in downgrade() 202 static bool try_acquire_writer(d1::rtm_rw_mutex& m, d1::rtm_rw_mutex::scoped_lock& s) { in try_acquire_writer() 221 static bool try_acquire_reader(d1::rtm_rw_mutex& m, d1::rtm_rw_mutex::scoped_lock& s) { in try_acquire_reader() 247 bool __TBB_EXPORTED_FUNC upgrade(d1::rtm_rw_mutex::scoped_lock& s) { in upgrade() 251 bool __TBB_EXPORTED_FUNC downgrade(d1::rtm_rw_mutex::scoped_lock& s) { in downgrade() 255 bool __TBB_EXPORTED_FUNC try_acquire_writer(d1::rtm_rw_mutex& m, d1::rtm_rw_mutex::scoped_lock& s) { in try_acquire_writer() 259 bool __TBB_EXPORTED_FUNC try_acquire_reader(d1::rtm_rw_mutex& m, d1::rtm_rw_mutex::scoped_lock& s) { in try_acquire_reader() [all …]
|
| H A D | thread_request_serializer.cpp | 39 mutex_type::scoped_lock lock(my_mutex); in update() 47 mutex_type::scoped_lock lock(my_mutex); in set_active_num_workers() 84 mutex_type::scoped_lock lock(my_mutex, /* is_write = */ false); in register_mandatory_request() 99 mutex_type::scoped_lock lock(my_mutex, /* is_write = */ true); in set_active_num_workers() 114 void thread_request_serializer_proxy::enable_mandatory_concurrency(mutex_type::scoped_lock& lock) { in enable_mandatory_concurrency() 125 void thread_request_serializer_proxy::disable_mandatory_concurrency(mutex_type::scoped_lock& lock) { in disable_mandatory_concurrency()
|
| H A D | rtm_mutex.cpp | 37 static void release(d1::rtm_mutex::scoped_lock& s) { in release() 58 static void acquire(d1::rtm_mutex& m, d1::rtm_mutex::scoped_lock& s, bool only_speculate) { in acquire() 92 static bool try_acquire(d1::rtm_mutex& m, d1::rtm_mutex::scoped_lock& s) { in try_acquire() 108 void __TBB_EXPORTED_FUNC acquire(d1::rtm_mutex& m, d1::rtm_mutex::scoped_lock& s, bool only_specula… in acquire() 111 bool __TBB_EXPORTED_FUNC try_acquire(d1::rtm_mutex& m, d1::rtm_mutex::scoped_lock& s) { in try_acquire() 114 void __TBB_EXPORTED_FUNC release(d1::rtm_mutex::scoped_lock& s) { in release()
|
| H A D | threading_control.cpp | 215 global_mutex_type::scoped_lock lock(g_threading_control_mutex); in create_threading_control() 248 void threading_control::wait_last_reference(global_mutex_type::scoped_lock& lock) { in wait_last_reference() 268 global_mutex_type::scoped_lock lock(g_threading_control_mutex); in release() 290 global_mutex_type::scoped_lock lock(g_threading_control_mutex); in register_public_reference() 309 global_mutex_type::scoped_lock lock(g_threading_control_mutex); in create_client() 341 global_mutex_type::scoped_lock lock(g_threading_control_mutex); in is_present() 346 global_mutex_type::scoped_lock lock(g_threading_control_mutex); in register_lifetime_control() 353 global_mutex_type::scoped_lock lock(g_threading_control_mutex); in unregister_lifetime_control() 384 global_mutex_type::scoped_lock lock(g_threading_control_mutex); in max_num_workers()
|
| H A D | cancellation_disseminator.h | 45 threads_list_mutex_type::scoped_lock lock(my_threads_list_mutex); in propagate_task_group_state() 64 threads_list_mutex_type::scoped_lock lock(my_threads_list_mutex); in register_thread() 69 threads_list_mutex_type::scoped_lock lock(my_threads_list_mutex); in unregister_thread()
|
| H A D | market.cpp | 53 mutex_type::scoped_lock lock(my_mutex); in register_client() 59 mutex_type::scoped_lock lock(my_mutex); in unregister_and_destroy_client() 114 mutex_type::scoped_lock lock(my_mutex); in set_active_num_workers() 126 mutex_type::scoped_lock lock(my_mutex); in adjust_demand()
|
| 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 | global_control.cpp | 61 spin_mutex::scoped_lock lock(my_list_mutex); // protect my_list.empty() call in active_value() 84 spin_mutex::scoped_lock lock(my_list_mutex); // protect my_list.empty() call in active_value() 193 spin_mutex::scoped_lock lock(c->my_list_mutex); in create() 206 spin_mutex::scoped_lock lock(c->my_list_mutex); in destroy() 229 spin_mutex::scoped_lock lock(c->my_list_mutex); in remove_and_check_if_empty() 239 spin_mutex::scoped_lock lock(c->my_list_mutex); in is_present()
|
| H A D | thread_data.h | 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 | concurrent_monitor.h | 216 concurrent_monitor_mutex::scoped_lock l(my_mutex); in prepare_wait() 247 concurrent_monitor_mutex::scoped_lock l(my_mutex); in cancel_wait() 288 concurrent_monitor_mutex::scoped_lock l(my_mutex); in notify_one_relaxed() 327 concurrent_monitor_mutex::scoped_lock l(my_mutex); in notify_all_relaxed() 366 concurrent_monitor_mutex::scoped_lock l(my_mutex); in notify_relaxed() 401 concurrent_monitor_mutex::scoped_lock l(my_mutex); in notify_one_relaxed() 435 concurrent_monitor_mutex::scoped_lock l(my_mutex); in abort_all_relaxed()
|
| /oneTBB/test/tbb/ |
| H A D | test_mutex.h | 40 typename mutex_type::scoped_lock lock(mutex); in flog_once() 45 typename mutex_type::scoped_lock lock; in flog_once() 120 typename mutex_type::scoped_lock lock; in flog_once() 209 using scoped_lock = typename RWMutexType::scoped_lock; in TestIsWriter() local 216 scoped_lock lock(rw_mutex, /*writer = */false); in TestIsWriter() 220 scoped_lock lock(rw_mutex, /*writer = */true); in TestIsWriter() 225 scoped_lock lock; in TestIsWriter() 230 scoped_lock lock; in TestIsWriter() 236 scoped_lock lock(rw_mutex, /*writer = */false); in TestIsWriter() 246 using scoped_lock = typename oneapi::tbb::null_rw_mutex::scoped_lock; variable [all …]
|
| /oneTBB/doc/main/tbb_userguide/ |
| H A D | Mutual_Exclusion.rst | 31 FreeListMutexType::scoped_lock lock(FreeListMutex); 43 FreeListMutexType::scoped_lock lock(FreeListMutex); 49 The constructor for ``scoped_lock`` waits until there are no other locks 58 soon. For example, if the creation of the ``scoped_lock`` object in 63 FreeListMutexType::scoped_lock (FreeListMutex); 65 then the ``scoped_lock`` is destroyed when execution reaches the 77 FreeListMutexType::scoped_lock lock; 102 ``scoped_lock`` object causes the lock to be released, no matter whether 112 of the mutexes have a nested ``scoped_lock`` type, so given a mutex of 113 type ``M``, the corresponding lock type is ``M::scoped_lock``.
|
| /oneTBB/doc/main/reference/ |
| H A D | custom_mutex_chmap.rst | 56 .. cpp:function:: bool ReaderWriterMutex::scoped_lock::is_writer() const; 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. 84 class scoped_lock { 86 scoped_lock() : my_mutex_ptr(nullptr), my_writer_flag(false) {} 87 scoped_lock(SharedMutexWrapper& mutex, bool write = true) 97 ~scoped_lock() {
|
| /oneTBB/examples/graph/dining_philosophers/ |
| H A D | dining_philosophers.cpp | 208 oneapi::tbb::spin_mutex::scoped_lock lock(my_mutex); in forward() 216 oneapi::tbb::spin_mutex::scoped_lock lock(my_mutex); in eat() 221 oneapi::tbb::spin_mutex::scoped_lock lock(my_mutex); in eat() 228 oneapi::tbb::spin_mutex::scoped_lock lock(my_mutex); in think() 233 oneapi::tbb::spin_mutex::scoped_lock lock(my_mutex); in think() 285 oneapi::tbb::spin_mutex::scoped_lock lock(my_mutex); in main()
|