Home
last modified time | relevance | path

Searched refs:SpinLock (Results 1 – 25 of 50) sorted by relevance

12

/third_party/mindspore/mindspore/ccsrc/minddata/dataset/util/
Dlock.h25 class SpinLock {
33 SpinLock() : val_(kUnlocked) {} in SpinLock() function
35 SpinLock(const SpinLock &) = delete;
37 SpinLock(SpinLock &&) = delete;
39 ~SpinLock() = default;
41 SpinLock &operator=(const SpinLock &) = delete;
43 SpinLock &operator=(SpinLock &&) = delete;
150 explicit LockGuard(SpinLock *lock);
167 SpinLock *lck_;
Dlock.cc21 void SpinLock::Lock() { in Lock()
30 bool SpinLock::TryLock() { in TryLock()
35 void SpinLock::Unlock() noexcept { val_.store(kUnlocked); } in Unlock()
148 LockGuard::LockGuard(SpinLock *lock) : lck_(lock), own_lock_(false) { in LockGuard()
Dtask_manager.h112 SpinLock free_lock_;
113 SpinLock tg_lock_;
/third_party/skia/third_party/externals/abseil-cpp/absl/base/internal/
Dspinlock.h50 class ABSL_LOCKABLE SpinLock {
52 SpinLock() : lockword_(kSpinLockCooperative) { in SpinLock() function
58 explicit SpinLock(base_internal::SchedulingMode mode);
61 constexpr SpinLock(absl::ConstInitType, base_internal::SchedulingMode mode) in SpinLock() function
68 ~SpinLock() { ABSL_TSAN_MUTEX_DESTROY(this, __tsan_mutex_not_static); } in ~SpinLock()
70 ~SpinLock() = default;
180 SpinLock(const SpinLock&) = delete;
181 SpinLock& operator=(const SpinLock&) = delete;
188 inline explicit SpinLockHolder(SpinLock* l) ABSL_EXCLUSIVE_LOCK_FUNCTION(l) in SpinLockHolder()
198 SpinLock* lock_;
[all …]
Dspinlock.cc70 constexpr uint32_t SpinLock::kSpinLockHeld;
71 constexpr uint32_t SpinLock::kSpinLockCooperative;
72 constexpr uint32_t SpinLock::kSpinLockDisabledScheduling;
73 constexpr uint32_t SpinLock::kSpinLockSleeper;
74 constexpr uint32_t SpinLock::kWaitTimeMask;
77 SpinLock::SpinLock(base_internal::SchedulingMode mode) in SpinLock() function in absl::base_internal::SpinLock
85 uint32_t SpinLock::SpinLoop() { in SpinLoop()
102 void SpinLock::SlowLock() { in SlowLock()
170 void SpinLock::SlowUnlock(uint32_t lock_value) { in SlowUnlock()
196 uint32_t SpinLock::EncodeWaitCycles(int64_t wait_start_time, in EncodeWaitCycles()
[all …]
Dlow_level_scheduling.h43 class SpinLock; // To allow use of SchedulingGuard. variable
104 friend class SpinLock; variable
Dspinlock_linux.inc29 // The SpinLock lockword is `std::atomic<uint32_t>`. Here we assert that
36 "SpinLock lockword has the wrong size for a futex");
Dspinlock_benchmark.cc34 static auto* spinlock = new absl::base_internal::SpinLock(scheduling_mode); in BM_SpinLock()
Dthread_identity_test.cc33 ABSL_CONST_INIT static absl::base_internal::SpinLock map_lock(
/third_party/abseil-cpp/absl/base/internal/
Dspinlock.h53 class ABSL_LOCKABLE SpinLock {
55 SpinLock() : lockword_(kSpinLockCooperative) { in SpinLock() function
61 explicit SpinLock(base_internal::SchedulingMode mode);
64 constexpr SpinLock(absl::ConstInitType, base_internal::SchedulingMode mode) in SpinLock() function
71 ~SpinLock() { ABSL_TSAN_MUTEX_DESTROY(this, __tsan_mutex_not_static); } in ~SpinLock()
73 ~SpinLock() = default;
171 SpinLock(const SpinLock&) = delete;
172 SpinLock& operator=(const SpinLock&) = delete;
179 inline explicit SpinLockHolder(SpinLock* l) ABSL_EXCLUSIVE_LOCK_FUNCTION(l) in SpinLockHolder()
189 SpinLock* lock_;
[all …]
Dspinlock.cc70 constexpr uint32_t SpinLock::kSpinLockHeld;
71 constexpr uint32_t SpinLock::kSpinLockCooperative;
72 constexpr uint32_t SpinLock::kSpinLockDisabledScheduling;
73 constexpr uint32_t SpinLock::kSpinLockSleeper;
74 constexpr uint32_t SpinLock::kWaitTimeMask;
77 SpinLock::SpinLock(base_internal::SchedulingMode mode) in SpinLock() function in absl::base_internal::SpinLock
85 uint32_t SpinLock::SpinLoop() { in SpinLoop()
102 void SpinLock::SlowLock() { in SlowLock()
161 void SpinLock::SlowUnlock(uint32_t lock_value) { in SlowUnlock()
187 uint32_t SpinLock::EncodeWaitCycles(int64_t wait_start_time, in EncodeWaitCycles()
[all …]
Dlow_level_scheduling.h43 class SpinLock; // To allow use of SchedulingGuard. variable
102 friend class SpinLock; variable
Dspinlock_linux.inc29 // The SpinLock lockword is `std::atomic<uint32_t>`. Here we assert that
36 "SpinLock lockword has the wrong size for a futex");
Dspinlock_benchmark.cc34 static auto* spinlock = new absl::base_internal::SpinLock(scheduling_mode); in BM_SpinLock()
Dthread_identity_test.cc33 ABSL_CONST_INIT static absl::base_internal::SpinLock map_lock(
Dthread_identity.h44 class SpinLock; variable
/third_party/abseil-cpp/absl/base/
Dspinlock_test_common.cc49 return SpinLock::EncodeWaitCycles(wait_start_time, wait_end_time); in EncodeWaitCycles()
52 return SpinLock::DecodeWaitCycles(lock_value); in DecodeWaitCycles()
61 ABSL_CONST_INIT static SpinLock static_cooperative_spinlock(
63 ABSL_CONST_INIT static SpinLock static_noncooperative_spinlock(
82 static void TestFunction(int thread_salt, SpinLock* spinlock) { in TestFunction()
93 static void ThreadedTest(SpinLock* spinlock) { in ThreadedTest()
109 static_assert(std::is_trivially_destructible<SpinLock>(), "");
112 TEST(SpinLock, StackNonCooperativeDisablesScheduling) { in TEST() argument
113 SpinLock spinlock(base_internal::SCHEDULE_KERNEL_ONLY); in TEST()
119 TEST(SpinLock, StaticNonCooperativeDisablesScheduling) { in TEST() argument
[all …]
/third_party/skia/third_party/externals/abseil-cpp/absl/base/
Dspinlock_test_common.cc49 return SpinLock::EncodeWaitCycles(wait_start_time, wait_end_time); in EncodeWaitCycles()
52 return SpinLock::DecodeWaitCycles(lock_value); in DecodeWaitCycles()
61 ABSL_CONST_INIT static SpinLock static_cooperative_spinlock(
63 ABSL_CONST_INIT static SpinLock static_noncooperative_spinlock(
82 static void TestFunction(int thread_salt, SpinLock* spinlock) { in TestFunction()
93 static void ThreadedTest(SpinLock* spinlock) { in ThreadedTest()
110 static_assert(std::is_trivially_destructible<SpinLock>(), "");
113 TEST(SpinLock, StackNonCooperativeDisablesScheduling) { in TEST() argument
114 SpinLock spinlock(base_internal::SCHEDULE_KERNEL_ONLY); in TEST()
120 TEST(SpinLock, StaticNonCooperativeDisablesScheduling) { in TEST() argument
[all …]
/third_party/skia/third_party/externals/abseil-cpp/absl/strings/internal/
Dcordz_info.h185 using SpinLock = absl::base_internal::SpinLock;
195 SpinLock mutex;
Dcordz_handle.h89 absl::base_internal::SpinLock mutex;
/third_party/grpc/src/csharp/Grpc.Core/Internal/
DCompletionRegistry.cs42 SpinLock spinLock = new SpinLock(Debugger.IsAttached);
/third_party/mindspore/mindspore/core/mindrt/include/async/
Dspinlock.h24 class SpinLock {
/third_party/abseil-cpp/absl/random/internal/
Dpool_urbg.cc36 using absl::base_internal::SpinLock;
79 SpinLock mu_;
/third_party/skia/third_party/externals/abseil-cpp/absl/random/internal/
Dpool_urbg.cc36 using absl::base_internal::SpinLock;
79 SpinLock mu_;
/third_party/skia/third_party/externals/abseil-cpp/absl/synchronization/internal/
Dcreate_thread_identity.cc35 ABSL_CONST_INIT static base_internal::SpinLock freelist_lock(

12