Home
last modified time | relevance | path

Searched refs:MemoryOrder (Results 1 – 25 of 37) sorted by relevance

12

/external/rust/crates/grpcio-sys/grpc/src/core/lib/gprpp/
Datomic.h30 enum class MemoryOrder { enum
44 T Load(MemoryOrder order) const { in Load()
48 void Store(T val, MemoryOrder order) { in Store()
52 T Exchange(T desired, MemoryOrder order) { in Exchange()
56 bool CompareExchangeWeak(T* expected, T desired, MemoryOrder success, in CompareExchangeWeak()
57 MemoryOrder failure) { in CompareExchangeWeak()
63 bool CompareExchangeStrong(T* expected, T desired, MemoryOrder success, in CompareExchangeStrong()
64 MemoryOrder failure) { in CompareExchangeStrong()
71 T FetchAdd(Arg arg, MemoryOrder order = MemoryOrder::SEQ_CST) {
77 T FetchSub(Arg arg, MemoryOrder order = MemoryOrder::SEQ_CST) {
[all …]
Ddual_ref_counted.h70 refs_.FetchAdd(MakeRefPair(-1, 1), MemoryOrder::ACQ_REL); in Unref()
88 refs_.FetchAdd(MakeRefPair(-1, 1), MemoryOrder::ACQ_REL); in Unref()
111 uint64_t prev_ref_pair = refs_.Load(MemoryOrder::ACQUIRE); in RefIfNonZero()
123 &prev_ref_pair, prev_ref_pair + MakeRefPair(1, 0), MemoryOrder::ACQ_REL, in RefIfNonZero()
124 MemoryOrder::ACQUIRE)); in RefIfNonZero()
130 uint64_t prev_ref_pair = refs_.Load(MemoryOrder::ACQUIRE); in RefIfNonZero()
148 &prev_ref_pair, prev_ref_pair + MakeRefPair(1, 0), MemoryOrder::ACQ_REL, in RefIfNonZero()
149 MemoryOrder::ACQUIRE)); in RefIfNonZero()
172 refs_.FetchSub(MakeRefPair(0, 1), MemoryOrder::ACQ_REL); in WeakUnref()
194 refs_.FetchSub(MakeRefPair(0, 1), MemoryOrder::ACQ_REL); in WeakUnref()
[all …]
Dfork.cc172 MemoryOrder::RELAXED); in GlobalInit()
174 if (support_enabled_.Load(MemoryOrder::RELAXED)) { in GlobalInit()
181 if (support_enabled_.Load(MemoryOrder::RELAXED)) { in GlobalShutdown()
187 bool Fork::Enabled() { return support_enabled_.Load(MemoryOrder::RELAXED); } in Enabled()
192 support_enabled_.Store(enable, MemoryOrder::RELAXED); in Enable()
208 if (support_enabled_.Load(MemoryOrder::RELAXED)) { in BlockExecCtx()
215 if (support_enabled_.Load(MemoryOrder::RELAXED)) { in AllowExecCtx()
221 if (support_enabled_.Load(MemoryOrder::RELAXED)) { in IncThreadCount()
227 if (support_enabled_.Load(MemoryOrder::RELAXED)) { in DecThreadCount()
232 if (support_enabled_.Load(MemoryOrder::RELAXED)) { in AwaitThreads()
Dmpscq.cc30 node->next.Store(nullptr, MemoryOrder::RELAXED); in Push()
31 Node* prev = head_.Exchange(node, MemoryOrder::ACQ_REL); in Push()
32 prev->next.Store(node, MemoryOrder::RELEASE); in Push()
45 Node* next = tail_->next.Load(MemoryOrder::ACQUIRE); in PopAndCheckEnd()
54 next = tail->next.Load(MemoryOrder::ACQUIRE); in PopAndCheckEnd()
61 Node* head = head_.Load(MemoryOrder::ACQUIRE); in PopAndCheckEnd()
68 next = tail->next.Load(MemoryOrder::ACQUIRE); in PopAndCheckEnd()
Dref_counted.h73 const Value prior = value_.FetchAdd(n, MemoryOrder::RELAXED);
79 value_.FetchAdd(n, MemoryOrder::RELAXED);
84 const Value prior = value_.FetchAdd(n, MemoryOrder::RELAXED);
94 value_.FetchAdd(n, MemoryOrder::RELAXED);
101 const Value prior = value_.FetchAdd(1, MemoryOrder::RELAXED); in RefNonZero()
108 value_.FetchAdd(1, MemoryOrder::RELAXED); in RefNonZero()
113 const Value prior = value_.FetchAdd(1, MemoryOrder::RELAXED); in RefNonZero()
162 const Value prior = value_.FetchSub(1, MemoryOrder::ACQ_REL); in Unref()
179 const Value prior = value_.FetchSub(1, MemoryOrder::ACQ_REL); in Unref()
196 Value get() const { return value_.Load(MemoryOrder::RELAXED); } in get()
Dfork.h51 if (GPR_UNLIKELY(support_enabled_.Load(MemoryOrder::RELAXED))) { in IncExecCtxCount()
58 if (GPR_UNLIKELY(support_enabled_.Load(MemoryOrder::RELAXED))) { in DecExecCtxCount()
Dmpscq.h43 GPR_ASSERT(head_.Load(MemoryOrder::RELAXED) == &stub_); in ~MultiProducerSingleConsumerQueue()
Darena.h62 size_t begin = total_used_.FetchAdd(size, MemoryOrder::RELAXED); in Alloc()
/external/rust/crates/grpcio-sys/grpc/src/core/ext/filters/client_idle/
Dclient_idle_filter.cc203 const intptr_t previous_value = call_count_.FetchAdd(1, MemoryOrder::RELAXED); in IncreaseCallCount()
209 ChannelState state = state_.Load(MemoryOrder::RELAXED); in IncreaseCallCount()
216 state_.Store(CALLS_ACTIVE, MemoryOrder::RELAXED); in IncreaseCallCount()
227 MemoryOrder::ACQUIRE, in IncreaseCallCount()
228 MemoryOrder::RELAXED)) { in IncreaseCallCount()
234 state = state_.Load(MemoryOrder::RELAXED); in IncreaseCallCount()
242 const intptr_t previous_value = call_count_.FetchSub(1, MemoryOrder::RELAXED); in DecreaseCallCount()
251 ChannelState state = state_.Load(MemoryOrder::RELAXED); in DecreaseCallCount()
259 state_.Store(TIMER_PENDING, MemoryOrder::RELEASE); in DecreaseCallCount()
271 MemoryOrder::RELEASE, MemoryOrder::RELAXED)) { in DecreaseCallCount()
[all …]
/external/rust/crates/grpcio-sys/grpc/src/core/lib/channel/
Dchannelz.cc85 data.calls_started.FetchAdd(1, MemoryOrder::RELAXED); in RecordCallStarted()
87 MemoryOrder::RELAXED); in RecordCallStarted()
92 .calls_failed.FetchAdd(1, MemoryOrder::RELAXED); in RecordCallFailed()
97 .calls_succeeded.FetchAdd(1, MemoryOrder::RELAXED); in RecordCallSucceeded()
104 out->calls_started += data.calls_started.Load(MemoryOrder::RELAXED); in CollectData()
107 MemoryOrder::RELAXED); in CollectData()
109 MemoryOrder::RELAXED); in CollectData()
112 MemoryOrder::RELAXED); in CollectData()
172 int state_field = connectivity_state_.Load(MemoryOrder::RELAXED); in RenderJson()
226 connectivity_state_.Store(state_field, MemoryOrder::RELAXED); in SetConnectivityState()
[all …]
Dchannelz.h136 : calls_started(that.calls_started.Load(MemoryOrder::RELAXED)), in AtomicCounterData()
137 calls_succeeded(that.calls_succeeded.Load(MemoryOrder::RELAXED)), in AtomicCounterData()
138 calls_failed(that.calls_failed.Load(MemoryOrder::RELAXED)), in AtomicCounterData()
140 that.last_call_started_cycle.Load(MemoryOrder::RELAXED)) {} in AtomicCounterData()
282 streams_succeeded_.FetchAdd(1, MemoryOrder::RELAXED); in RecordStreamSucceeded()
285 streams_failed_.FetchAdd(1, MemoryOrder::RELAXED); in RecordStreamFailed()
290 keepalives_sent_.FetchAdd(1, MemoryOrder::RELAXED); in RecordKeepaliveSent()
/external/rust/crates/grpcio-sys/grpc/src/core/lib/iomgr/executor/
Dmpmcqueue.cc32 count_.Store(count_.Load(MemoryOrder::RELAXED) - 1, MemoryOrder::RELAXED); in PopFront()
43 if (count_.Load(MemoryOrder::RELAXED) == 0) { in PopFront()
60 if (count_.Load(MemoryOrder::RELAXED) > 0) { in PopFront()
95 GPR_ASSERT(count_.Load(MemoryOrder::RELAXED) == 0); in ~InfLenFIFOQueue()
105 int curr_count = count_.Load(MemoryOrder::RELAXED); in Put()
137 count_.Store(curr_count + 1, MemoryOrder::RELAXED); in Put()
146 if (count_.Load(MemoryOrder::RELAXED) == 0) { in Get()
157 } while (count_.Load(MemoryOrder::RELAXED) == 0); in Get()
164 GPR_DEBUG_ASSERT(count_.Load(MemoryOrder::RELAXED) > 0); in Get()
Dthreadpool.cc76 GPR_DEBUG_ASSERT(!shut_down_.Load(MemoryOrder::RELAXED)); in AssertHasNotBeenShutDown()
106 shut_down_.Store(true, MemoryOrder::RELAXED); in ~ThreadPool()
/external/rust/crates/grpcio-sys/grpc/src/core/lib/iomgr/poller/
Deventmanager_libuv.cc62 return should_stop_.Load(grpc_core::MemoryOrder::ACQUIRE) != 0; in ShouldStop()
66 if (should_stop_.Load(grpc_core::MemoryOrder::ACQUIRE)) { in Shutdown()
72 while (shutdown_refcount_.Load(grpc_core::MemoryOrder::ACQUIRE) > 0) { in Shutdown()
76 should_stop_.Store(true, grpc_core::MemoryOrder::RELEASE); in Shutdown()
80 shutdown_refcount_.FetchAdd(1, grpc_core::MemoryOrder::RELAXED); in ShutdownRef()
84 if (shutdown_refcount_.FetchSub(1, grpc_core::MemoryOrder::ACQ_REL) == 1) { in ShutdownUnref()
/external/rust/crates/grpcio-sys/grpc/src/core/ext/xds/
Dxds_client_stats.cc35 return from->Exchange(0, MemoryOrder::RELAXED); in GetAndResetCounter()
138 total_requests_in_progress_.Load(MemoryOrder::RELAXED), in GetSnapshotAndReset()
147 total_issued_requests_.FetchAdd(1, MemoryOrder::RELAXED); in AddCallStarted()
148 total_requests_in_progress_.FetchAdd(1, MemoryOrder::RELAXED); in AddCallStarted()
154 to_increment.FetchAdd(1, MemoryOrder::RELAXED); in AddCallFinished()
155 total_requests_in_progress_.FetchAdd(-1, MemoryOrder::ACQ_REL); in AddCallFinished()
/external/rust/crates/grpcio-sys/grpc/src/core/lib/surface/
Dcompletion_queue.cc228 return num_queue_items_.Load(grpc_core::MemoryOrder::RELAXED); in num_items()
250 if (pending_events.Load(grpc_core::MemoryOrder::ACQUIRE) != 0) { in ~cq_next_data()
281 if (pending_events.Load(grpc_core::MemoryOrder::ACQUIRE) != 0) { in ~cq_pluck_data()
319 if (pending_events.Load(grpc_core::MemoryOrder::ACQUIRE) != 0) { in ~cq_callback_data()
470 if (cqd->pending_events.FetchSub(1, grpc_core::MemoryOrder::ACQ_REL) == 1) { in grpc_completion_queue_thread_local_cache_flush()
487 return num_queue_items_.FetchAdd(1, grpc_core::MemoryOrder::RELAXED) == 0; in Push()
508 num_queue_items_.FetchSub(1, grpc_core::MemoryOrder::RELAXED); in Pop()
729 cqd->things_queued_ever.FetchAdd(1, grpc_core::MemoryOrder::RELAXED);
735 if (cqd->pending_events.Load(grpc_core::MemoryOrder::ACQUIRE) != 1) {
749 if (cqd->pending_events.FetchSub(1, grpc_core::MemoryOrder::ACQ_REL) ==
[all …]
Dserver.cc1198 GPR_ASSERT(state_.Load(MemoryOrder::RELAXED) != CallState::PENDING); in ~CallData()
1211 state_.Store(state, MemoryOrder::RELAXED); in SetState()
1217 MemoryOrder::ACQ_REL, in MaybeActivate()
1218 MemoryOrder::RELAXED); in MaybeActivate()
1225 MemoryOrder::ACQ_REL, in FailCallCreation()
1226 MemoryOrder::ACQUIRE)) { in FailCallCreation()
1229 MemoryOrder::ACQ_REL, in FailCallCreation()
1230 MemoryOrder::RELAXED)) { in FailCallCreation()
1287 calld->state_.Store(CallState::ZOMBIED, MemoryOrder::RELAXED); in PublishNewRpc()
1311 state_.Store(CallState::ZOMBIED, MemoryOrder::RELAXED); in StartNewRpc()
/external/rust/crates/grpcio-sys/grpc/src/core/lib/transport/
Dconnectivity_state.cc104 grpc_connectivity_state current_state = state_.Load(MemoryOrder::RELAXED); in ~ConnectivityStateTracker()
124 grpc_connectivity_state current_state = state_.Load(MemoryOrder::RELAXED); in AddWatcher()
153 grpc_connectivity_state current_state = state_.Load(MemoryOrder::RELAXED); in SetState()
160 state_.Store(state, MemoryOrder::RELAXED); in SetState()
177 grpc_connectivity_state state = state_.Load(MemoryOrder::RELAXED); in state()
Dmetadata.h244 const intptr_t prior = refcnt_.FetchAdd(1, MemoryOrder::RELAXED); in Ref()
256 refcnt_.FetchAdd(1, MemoryOrder::RELAXED); in Ref()
259 const intptr_t prior = refcnt_.FetchSub(1, MemoryOrder::ACQ_REL); in Unref()
269 intptr_t RefValue() { return refcnt_.Load(MemoryOrder::RELAXED); } in RefValue()
270 bool AllRefsDropped() { return refcnt_.Load(MemoryOrder::ACQUIRE) == 0; } in AllRefsDropped()
271 bool FirstRef() { return refcnt_.FetchAdd(1, MemoryOrder::RELAXED) == 0; } in FirstRef()
Dmetadata.cc148 void* user_data = user_data_.data.Load(grpc_core::MemoryOrder::RELAXED); in ~AllocatedMetadata()
151 user_data_.destroy_user_data.Load(grpc_core::MemoryOrder::RELAXED); in ~AllocatedMetadata()
192 void* user_data = user_data_.data.Load(grpc_core::MemoryOrder::RELAXED); in ~InternedMetadata()
195 user_data_.destroy_user_data.Load(grpc_core::MemoryOrder::RELAXED); in ~InternedMetadata()
563 if (user_data->destroy_user_data.Load(grpc_core::MemoryOrder::ACQUIRE) == in get_user_data()
565 return user_data->data.Load(grpc_core::MemoryOrder::RELAXED); in get_user_data()
597 if (ud->destroy_user_data.Load(grpc_core::MemoryOrder::RELAXED)) { in set_user_data()
603 return ud->data.Load(grpc_core::MemoryOrder::RELAXED); in set_user_data()
605 ud->data.Store(data, grpc_core::MemoryOrder::RELAXED); in set_user_data()
606 ud->destroy_user_data.Store(destroy_func, grpc_core::MemoryOrder::RELEASE); in set_user_data()
/external/OpenCL-CTS/test_conformance/c11_atomics/
Dtest_atomics.cpp31 using CBasicTestMemOrderScope<HostAtomicType, HostDataType>::MemoryOrder;
45 if(MemoryOrder() == MEMORY_ORDER_ACQUIRE || in ExecuteSingleTest()
46 MemoryOrder() == MEMORY_ORDER_ACQ_REL) in ExecuteSingleTest()
49 if (CheckCapabilities(MemoryScope(), MemoryOrder()) == TEST_SKIPPED_ITSELF) in ExecuteSingleTest()
63 host_atomic_store(&destMemory[tid], (HostDataType)tid, MemoryOrder()); in HostFunction()
206 using CBasicTestMemOrderScope<HostAtomicType, HostDataType>::MemoryOrder;
221 if(MemoryOrder() == MEMORY_ORDER_RELEASE || in ExecuteSingleTest()
222 MemoryOrder() == MEMORY_ORDER_ACQ_REL) in ExecuteSingleTest()
225 if (CheckCapabilities(MemoryScope(), MemoryOrder()) == TEST_SKIPPED_ITSELF) in ExecuteSingleTest()
236 (MemoryOrder() == MEMORY_ORDER_ACQUIRE) in ProgramCore()
[all …]
Dcommon.h463 if(MemoryOrder() != MEMORY_ORDER_EMPTY) in SingleTestName()
465 …testName += std::string(", ")+std::string(get_memory_order_type_name(MemoryOrder())).substr(sizeof… in SingleTestName()
484 if (CheckCapabilities(MemoryScope(), MemoryOrder()) == TEST_SKIPPED_ITSELF) in ExecuteSingleTest()
508 MemoryOrder(memoryOrder[oi]); in ExecuteForEachParameterSet()
515 void MemoryOrder(TExplicitMemoryOrderType memoryOrder) {_memoryOrder = memoryOrder;} in MemoryOrder() function
516 TExplicitMemoryOrderType MemoryOrder() {return _memoryOrder;} in MemoryOrder() function
519 if(MemoryOrder() != MEMORY_ORDER_EMPTY) in MemoryOrderStr()
520 return std::string(", ")+get_memory_order_type_name(MemoryOrder()); in MemoryOrderStr()
565 using CBasicTestMemOrderScope<HostAtomicType, HostDataType>::MemoryOrder;
577 if(MemoryOrder() != MEMORY_ORDER_EMPTY) in SingleTestName()
[all …]
/external/rust/crates/grpcio-sys/grpc/src/core/ext/filters/client_channel/
Dclient_channel_channelz.cc42 connectivity_state_.Store(state, MemoryOrder::RELAXED); in UpdateConnectivityState()
53 connectivity_state_.Load(MemoryOrder::RELAXED); in RenderJson()
/external/llvm-project/libcxxabi/src/
Dcxa_guard_impl.h121 using MemoryOrder = std::__libcpp_atomic_order;
127 IntType load(MemoryOrder ord) { in load()
130 void store(IntType val, MemoryOrder ord) { in store()
133 IntType exchange(IntType new_val, MemoryOrder ord) { in exchange()
136 …bool compare_exchange(IntType *expected, IntType desired, MemoryOrder ord_success, MemoryOrder ord… in compare_exchange()
/external/rust/crates/grpcio-sys/grpc/src/core/ext/filters/client_channel/health/
Dhealth_check_client.cc429 if (cancelled_.CompareExchangeStrong(&expected, true, MemoryOrder::ACQ_REL, in Cancel()
430 MemoryOrder::ACQUIRE)) { in Cancel()
474 seen_response_.Store(true, MemoryOrder::RELEASE); in DoneReadingRecvMessage()
600 if (seen_response_.Load(MemoryOrder::ACQUIRE)) { in CallEndedLocked()

12