Home
last modified time | relevance | path

Searched refs:subtle (Results 1 – 25 of 270) sorted by relevance

1234567891011

/external/libchrome/base/
Datomicops_unittest.cc35 EXPECT_EQ(base::subtle::NoBarrier_AtomicIncrement(&s.count, 1), 1); in TestAtomicIncrement()
40 EXPECT_EQ(base::subtle::NoBarrier_AtomicIncrement(&s.count, 2), 3); in TestAtomicIncrement()
45 EXPECT_EQ(base::subtle::NoBarrier_AtomicIncrement(&s.count, 3), 6); in TestAtomicIncrement()
50 EXPECT_EQ(base::subtle::NoBarrier_AtomicIncrement(&s.count, -3), 3); in TestAtomicIncrement()
55 EXPECT_EQ(base::subtle::NoBarrier_AtomicIncrement(&s.count, -2), 1); in TestAtomicIncrement()
60 EXPECT_EQ(base::subtle::NoBarrier_AtomicIncrement(&s.count, -1), 0); in TestAtomicIncrement()
65 EXPECT_EQ(base::subtle::NoBarrier_AtomicIncrement(&s.count, -1), -1); in TestAtomicIncrement()
70 EXPECT_EQ(base::subtle::NoBarrier_AtomicIncrement(&s.count, -4), -5); in TestAtomicIncrement()
75 EXPECT_EQ(base::subtle::NoBarrier_AtomicIncrement(&s.count, 5), 0); in TestAtomicIncrement()
88 AtomicType prev = base::subtle::NoBarrier_CompareAndSwap(&value, 0, 1); in TestCompareAndSwap()
[all …]
Dlazy_instance_helpers.h20 constexpr subtle::AtomicWord kLazyInstanceStateCreating = 1;
25 BASE_EXPORT bool NeedsLazyInstance(subtle::AtomicWord* state);
30 BASE_EXPORT void CompleteLazyInstance(subtle::AtomicWord* state,
31 subtle::AtomicWord new_instance,
37 namespace subtle {
58 Type* GetOrCreateLazyPointer(subtle::AtomicWord* state, in GetOrCreateLazyPointer()
68 constexpr subtle::AtomicWord kLazyInstanceCreatedMask = in GetOrCreateLazyPointer()
77 subtle::AtomicWord instance = subtle::Acquire_Load(state); in GetOrCreateLazyPointer()
83 reinterpret_cast<subtle::AtomicWord>((*creator_func)(creator_arg)); in GetOrCreateLazyPointer()
90 instance = subtle::Acquire_Load(state); in GetOrCreateLazyPointer()
Dlazy_instance_helpers.cc14 bool NeedsLazyInstance(subtle::AtomicWord* state) { in NeedsLazyInstance()
20 if (subtle::NoBarrier_CompareAndSwap(state, 0, kLazyInstanceStateCreating) == in NeedsLazyInstance()
31 if (subtle::Acquire_Load(state) == kLazyInstanceStateCreating) { in NeedsLazyInstance()
43 } while (subtle::Acquire_Load(state) == kLazyInstanceStateCreating); in NeedsLazyInstance()
49 void CompleteLazyInstance(subtle::AtomicWord* state, in CompleteLazyInstance()
50 subtle::AtomicWord new_instance, in CompleteLazyInstance()
56 subtle::Release_Store(state, new_instance); in CompleteLazyInstance()
Datomicops_internals_atomicword_compat.h28 namespace subtle {
58 return base::subtle::Acquire_CompareAndSwap( in Acquire_CompareAndSwap()
65 return base::subtle::Release_CompareAndSwap( in Release_CompareAndSwap()
75 return base::subtle::Acquire_Store( in Acquire_Store()
80 return base::subtle::Release_Store( in Release_Store()
90 return base::subtle::Acquire_Load( in Acquire_Load()
95 return base::subtle::Release_Load( in Release_Load()
Dlazy_instance_unittest.cc210 base::subtle::NoBarrier_Store(&constructor_called_, 1); in BlockingConstructor()
212 while (!base::subtle::NoBarrier_Load(&complete_construction_)) in BlockingConstructor()
219 base::subtle::NoBarrier_Store(&constructor_called_, 0); in ~BlockingConstructor()
220 base::subtle::NoBarrier_Store(&complete_construction_, 0); in ~BlockingConstructor()
225 return base::subtle::NoBarrier_Load(&constructor_called_); in WasConstructorCalled()
230 base::subtle::NoBarrier_Store(&complete_construction_, 1); in CompleteConstructionNow()
237 static base::subtle::Atomic32 constructor_called_;
238 static base::subtle::Atomic32 complete_construction_;
271 base::subtle::Atomic32 BlockingConstructor::constructor_called_ = 0;
273 base::subtle::Atomic32 BlockingConstructor::complete_construction_ = 0;
/external/libchrome/base/sampling_heap_profiler/
Dlock_free_address_hash_set.cc20 for (subtle::AtomicWord bucket : buckets_) { in ~LockFreeAddressHashSet()
34 subtle::NoBarrier_AtomicIncrement(&size_, 1); in Insert()
36 subtle::AtomicWord* bucket_ptr = &buckets_[h & bucket_mask_]; in Insert()
37 Node* node = reinterpret_cast<Node*>(subtle::NoBarrier_Load(bucket_ptr)); in Insert()
40 if (subtle::NoBarrier_CompareAndSwap( in Insert()
41 &node->key, 0, reinterpret_cast<subtle::AtomicWord>(key)) == 0) { in Insert()
49 subtle::AtomicWord current_head = subtle::NoBarrier_Load(bucket_ptr); in Insert()
50 subtle::AtomicWord expected_head; in Insert()
52 subtle::NoBarrier_Store(&new_node->next, current_head); in Insert()
54 current_head = subtle::Release_CompareAndSwap( in Insert()
[all …]
Dlock_free_address_hash_set.h74 return static_cast<size_t>(subtle::NoBarrier_Load(&size_)); in size()
87 subtle::AtomicWord key;
88 subtle::AtomicWord next;
95 return reinterpret_cast<Node*>(subtle::NoBarrier_Load(&node->next)); in next_node()
98 std::vector<subtle::AtomicWord> buckets_;
100 subtle::AtomicWord size_ = 0;
104 subtle::NoBarrier_Store(&key, reinterpret_cast<subtle::AtomicWord>(a_key)); in Node()
105 subtle::NoBarrier_Store(&next, 0); in Node()
119 subtle::NoBarrier_Store(&node->key, 0); in Remove()
120 subtle::NoBarrier_AtomicIncrement(&size_, -1); in Remove()
[all …]
/external/libchrome/base/threading/
Dthread_collision_warner.cc16 static subtle::Atomic32 CurrentThread() { in CurrentThread()
21 const subtle::Atomic32 atomic_thread_id = in CurrentThread()
22 static_cast<subtle::Atomic32>(current_thread_id); in CurrentThread()
31 subtle::Atomic32 current_thread_id = CurrentThread(); in EnterSelf()
33 int previous_value = subtle::NoBarrier_CompareAndSwap(&valid_thread_id_, in EnterSelf()
42 subtle::NoBarrier_AtomicIncrement(&counter_, 1); in EnterSelf()
46 subtle::Atomic32 current_thread_id = CurrentThread(); in Enter()
48 if (subtle::NoBarrier_CompareAndSwap(&valid_thread_id_, in Enter()
55 subtle::NoBarrier_AtomicIncrement(&counter_, 1); in Enter()
59 if (subtle::Barrier_AtomicIncrement(&counter_, -1) == 0) { in Leave()
[all …]
Dthread_local_storage.cc69 base::subtle::Atomic32 g_native_tls_key =
151 base::subtle::NoBarrier_Load(&g_native_tls_key); in ConstructTlsVector()
171 base::subtle::NoBarrier_CompareAndSwap( in ConstructTlsVector()
178 key = base::subtle::NoBarrier_Load(&g_native_tls_key); in ConstructTlsVector()
209 base::subtle::NoBarrier_Load(&g_native_tls_key); in OnThreadExitInternal()
228 base::subtle::NoBarrier_Load(&g_native_tls_key); in OnThreadExitInternal()
285 base::subtle::NoBarrier_Load(&g_native_tls_key); in OnThreadExit()
307 base::subtle::NoBarrier_AtomicExchange(
320 base::subtle::NoBarrier_Load(&g_native_tls_key); in HasBeenDestroyed()
328 base::subtle::NoBarrier_Load(&g_native_tls_key); in Initialize()
[all …]
/external/libchrome/mojo/core/
Dshared_buffer_dispatcher.cc110 base::subtle::PlatformSharedMemoryRegion region, in CreateFromPlatformSharedMemoryRegion()
164 base::subtle::PlatformSharedMemoryRegion::Mode mode; in Deserialize()
167 mode = base::subtle::PlatformSharedMemoryRegion::Mode::kReadOnly; in Deserialize()
170 mode = base::subtle::PlatformSharedMemoryRegion::Mode::kWritable; in Deserialize()
173 mode = base::subtle::PlatformSharedMemoryRegion::Mode::kUnsafe; in Deserialize()
180 auto region = base::subtle::PlatformSharedMemoryRegion::Take( in Deserialize()
193 base::subtle::PlatformSharedMemoryRegion
197 return base::subtle::PlatformSharedMemoryRegion(); in PassPlatformSharedMemoryRegion()
211 region_ = base::subtle::PlatformSharedMemoryRegion(); in Close()
232 base::subtle::PlatformSharedMemoryRegion::Mode::kUnsafe) { in DuplicateBufferHandle()
[all …]
Dshared_buffer_dispatcher.h53 base::subtle::PlatformSharedMemoryRegion region,
67 base::subtle::PlatformSharedMemoryRegion PassPlatformSharedMemoryRegion();
70 base::subtle::PlatformSharedMemoryRegion& GetRegionForTesting() { in GetRegionForTesting()
97 base::subtle::PlatformSharedMemoryRegion region);
101 base::subtle::PlatformSharedMemoryRegion region);
116 base::subtle::PlatformSharedMemoryRegion region_;
/external/libchrome/mojo/public/cpp/system/
Dplatform_handle.cc37 base::subtle::PlatformSharedMemoryRegion region) { in WrapPlatformSharedMemoryRegion()
43 case base::subtle::PlatformSharedMemoryRegion::Mode::kReadOnly: in WrapPlatformSharedMemoryRegion()
46 case base::subtle::PlatformSharedMemoryRegion::Mode::kWritable: in WrapPlatformSharedMemoryRegion()
49 case base::subtle::PlatformSharedMemoryRegion::Mode::kUnsafe: in WrapPlatformSharedMemoryRegion()
57 base::subtle::PlatformSharedMemoryRegion::ScopedPlatformHandle handle = in WrapPlatformSharedMemoryRegion()
79 base::subtle::PlatformSharedMemoryRegion::Mode::kWritable) { in WrapPlatformSharedMemoryRegion()
99 base::subtle::PlatformSharedMemoryRegion UnwrapPlatformSharedMemoryRegion( in UnwrapPlatformSharedMemoryRegion()
102 return base::subtle::PlatformSharedMemoryRegion(); in UnwrapPlatformSharedMemoryRegion()
115 return base::subtle::PlatformSharedMemoryRegion(); in UnwrapPlatformSharedMemoryRegion()
117 base::subtle::PlatformSharedMemoryRegion::ScopedPlatformHandle region_handle; in UnwrapPlatformSharedMemoryRegion()
[all …]
/external/libchrome/base/memory/
Dref_counted.h23 namespace subtle {
291 static constexpr ::base::subtle::StartRefCountFromOneTag \
292 kRefCountPreference = ::base::subtle::kStartRefCountFromOneTag
305 class RefCounted : public subtle::RefCountedBase {
307 static constexpr subtle::StartRefCountFromZeroTag kRefCountPreference =
308 subtle::kStartRefCountFromZeroTag;
310 RefCounted() : subtle::RefCountedBase(T::kRefCountPreference) {} in RefCounted()
313 subtle::RefCountedBase::AddRef(); in AddRef()
317 if (subtle::RefCountedBase::Release()) { in Release()
372 class RefCountedThreadSafe : public subtle::RefCountedThreadSafeBase {
[all …]
Dwritable_shared_memory_region.cc16 subtle::PlatformSharedMemoryRegion handle = in Create()
17 subtle::PlatformSharedMemoryRegion::CreateWritable(size); in Create()
24 subtle::PlatformSharedMemoryRegion handle) { in Deserialize()
29 subtle::PlatformSharedMemoryRegion
38 subtle::PlatformSharedMemoryRegion handle = std::move(region.handle_); in ConvertToReadOnly()
47 subtle::PlatformSharedMemoryRegion handle = std::move(region.handle_); in ConvertToUnsafe()
85 subtle::PlatformSharedMemoryRegion handle) in WritableSharedMemoryRegion()
89 subtle::PlatformSharedMemoryRegion::Mode::kWritable); in WritableSharedMemoryRegion()
Dsingleton.h107 if (subtle::NoBarrier_AtomicExchange(&dead_, 1)) in New()
124 static void ResurrectForTesting() { subtle::NoBarrier_Store(&dead_, 0); } in ResurrectForTesting()
129 static subtle::Atomic32 dead_;
135 subtle::Atomic32 StaticMemorySingletonTraits<Type>::dead_ = 0;
236 return subtle::GetOrCreateLazyPointer( in get()
251 Traits::Delete(reinterpret_cast<Type*>(subtle::NoBarrier_Load(&instance_))); in OnExit()
254 static subtle::AtomicWord instance_;
258 subtle::AtomicWord Singleton<Type, Traits, DifferentiatingType>::instance_ = 0;
Dref_counted_delete_on_sequence.h34 class RefCountedDeleteOnSequence : public subtle::RefCountedThreadSafeBase {
36 static constexpr subtle::StartRefCountFromZeroTag kRefCountPreference =
37 subtle::kStartRefCountFromZeroTag;
43 : subtle::RefCountedThreadSafeBase(T::kRefCountPreference), in RefCountedDeleteOnSequence()
48 void AddRef() const { subtle::RefCountedThreadSafeBase::AddRef(); } in AddRef()
51 if (subtle::RefCountedThreadSafeBase::Release()) in Release()
Dunsafe_shared_memory_region.cc15 subtle::PlatformSharedMemoryRegion handle = in Create()
16 subtle::PlatformSharedMemoryRegion::CreateUnsafe(size); in Create()
23 subtle::PlatformSharedMemoryRegion handle) { in Deserialize()
28 subtle::PlatformSharedMemoryRegion
68 subtle::PlatformSharedMemoryRegion handle) in UnsafeSharedMemoryRegion()
72 subtle::PlatformSharedMemoryRegion::Mode::kUnsafe); in UnsafeSharedMemoryRegion()
Dread_only_shared_memory_region.cc16 subtle::PlatformSharedMemoryRegion handle = in Create()
17 subtle::PlatformSharedMemoryRegion::CreateWritable(size); in Create()
43 subtle::PlatformSharedMemoryRegion handle) { in Deserialize()
48 subtle::PlatformSharedMemoryRegion
89 subtle::PlatformSharedMemoryRegion handle) in ReadOnlySharedMemoryRegion()
93 subtle::PlatformSharedMemoryRegion::Mode::kReadOnly); in ReadOnlySharedMemoryRegion()
Dunsafe_shared_memory_region.h43 subtle::PlatformSharedMemoryRegion handle);
49 static subtle::PlatformSharedMemoryRegion TakeHandleForSerialization(
102 explicit UnsafeSharedMemoryRegion(subtle::PlatformSharedMemoryRegion handle);
106 subtle::PlatformSharedMemoryRegion::PlatformHandle GetPlatformHandle() const { in GetPlatformHandle()
111 subtle::PlatformSharedMemoryRegion handle_;
/external/libchrome/base/android/
Djni_android.cc146 base::subtle::AtomicWord* atomic_class_id) { in LazyGetClass()
147 static_assert(sizeof(subtle::AtomicWord) >= sizeof(jclass), in LazyGetClass()
149 subtle::AtomicWord value = base::subtle::Acquire_Load(atomic_class_id); in LazyGetClass()
154 subtle::AtomicWord null_aw = reinterpret_cast<subtle::AtomicWord>(NULL); in LazyGetClass()
155 subtle::AtomicWord cas_result = base::subtle::Release_CompareAndSwap( in LazyGetClass()
158 reinterpret_cast<subtle::AtomicWord>(clazz.obj())); in LazyGetClass()
192 base::subtle::AtomicWord* atomic_method_id) { in LazyGet()
193 static_assert(sizeof(subtle::AtomicWord) >= sizeof(jmethodID), in LazyGet()
195 subtle::AtomicWord value = base::subtle::Acquire_Load(atomic_method_id); in LazyGet()
199 base::subtle::Release_Store( in LazyGet()
[all …]
/external/libchrome/base/test/
Dscoped_task_environment_unittest.cc155 subtle::Atomic32 counter = 0; in TEST_P()
162 [](subtle::Atomic32* counter) { in TEST_P()
163 subtle::NoBarrier_AtomicIncrement(counter, 4); in TEST_P()
171 [](subtle::Atomic32* counter) { in TEST_P()
172 subtle::NoBarrier_AtomicIncrement(counter, 128); in TEST_P()
183 [](subtle::Atomic32* counter) { in TEST_P()
184 subtle::NoBarrier_AtomicIncrement(counter, 8); in TEST_P()
191 [](subtle::Atomic32* counter) { in TEST_P()
192 subtle::NoBarrier_AtomicIncrement(counter, 16); in TEST_P()
199 [](subtle::Atomic32* counter) { in TEST_P()
[all …]
/external/libchrome/base/allocator/
Dallocator_shim.cc39 subtle::AtomicWord g_chain_head = reinterpret_cast<subtle::AtomicWord>(
73 *static_cast<const volatile subtle::AtomicWord*>(&g_chain_head) in GetChainHead()
75 subtle::NoBarrier_Load(&g_chain_head) in GetChainHead()
107 subtle::MemoryBarrier(); in InsertAllocatorDispatch()
108 subtle::AtomicWord old_value = in InsertAllocatorDispatch()
109 reinterpret_cast<subtle::AtomicWord>(chain_head); in InsertAllocatorDispatch()
112 if (subtle::NoBarrier_CompareAndSwap( in InsertAllocatorDispatch()
114 reinterpret_cast<subtle::AtomicWord>(dispatch)) == old_value) { in InsertAllocatorDispatch()
125 subtle::NoBarrier_Store(&g_chain_head, in RemoveAllocatorDispatchForTesting()
126 reinterpret_cast<subtle::AtomicWord>(dispatch->next)); in RemoveAllocatorDispatchForTesting()
/external/libchrome/base/android/jni_generator/
DtestConstantsFromJavaP.golden24 JNI_REGISTRATION_EXPORT base::subtle::AtomicWord g_android_view_MotionEvent_clazz = 0;
127 static base::subtle::AtomicWord g_android_view_MotionEvent_finalize = 0;
145 static base::subtle::AtomicWord
194 static base::subtle::AtomicWord
241 static base::subtle::AtomicWord g_android_view_MotionEvent_obtainAVME_J_J_I_F_F_F_F_I_F_F_I_I = 0;
285 static base::subtle::AtomicWord g_android_view_MotionEvent_obtainAVME_J_J_I_I_F_F_F_F_I_F_F_I_I = 0;
331 static base::subtle::AtomicWord g_android_view_MotionEvent_obtainAVME_J_J_I_F_F_I = 0;
362 static base::subtle::AtomicWord g_android_view_MotionEvent_obtainAVME_AVME = 0;
383 static base::subtle::AtomicWord g_android_view_MotionEvent_obtainNoHistory = 0;
404 static base::subtle::AtomicWord g_android_view_MotionEvent_recycle = 0;
[all …]
DtestCalledByNatives.golden27 JNI_REGISTRATION_EXPORT base::subtle::AtomicWord g_org_chromium_TestJni_clazz = 0;
36 JNI_REGISTRATION_EXPORT base::subtle::AtomicWord g_org_chromium_TestJni_00024InfoBar_clazz = 0;
51 static base::subtle::AtomicWord g_org_chromium_TestJni_showConfirmInfoBar = 0;
75 static base::subtle::AtomicWord g_org_chromium_TestJni_showAutoLoginInfoBar = 0;
97 static base::subtle::AtomicWord g_org_chromium_TestJni_00024InfoBar_dismiss = 0;
113 static base::subtle::AtomicWord g_org_chromium_TestJni_shouldShowAutoLogin = 0;
135 static base::subtle::AtomicWord g_org_chromium_TestJni_openUrl = 0;
154 static base::subtle::AtomicWord g_org_chromium_TestJni_activateHardwareAcceleration = 0;
176 static base::subtle::AtomicWord g_org_chromium_TestJni_updateStatus = 0;
194 static base::subtle::AtomicWord g_org_chromium_TestJni_uncheckedCall = 0;
[all …]
/external/libchrome/base/metrics/
Dhistogram_samples.cc79 sizeof(subtle::Atomic32),
84 AtomicSingleSample single_sample = subtle::Acquire_Load(&as_atomic); in Load()
95 AtomicSingleSample single_sample = subtle::NoBarrier_AtomicExchange( in Extract()
129 subtle::Atomic32 original = subtle::Acquire_Load(&as_atomic); in Accumulate()
160 subtle::Atomic32 existing = subtle::Release_CompareAndSwap( in Accumulate()
169 return subtle::Acquire_Load(&as_atomic) == kDisabledSingleSample; in IsDisabled()
249 subtle::NoBarrier_AtomicIncrement(&meta_->sum, sum); in IncreaseSumAndCount()
253 subtle::NoBarrier_AtomicIncrement(&meta_->redundant_count, count); in IncreaseSumAndCount()

1234567891011