MCPcopy Create free account
hub / github.com/apache/brpc / store

Method store

src/bthread/task_group.cpp:107–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105}
106
107void AtomicInteger128::store(Value value) {
108#if __x86_64__
109 __m128i v = _mm_load_si128(reinterpret_cast<__m128i*>(&value));
110 _mm_store_si128(reinterpret_cast<__m128i*>(&_value), v);
111#elif __ARM_NEON
112 int64x2_t v = vld1q_s64(reinterpret_cast<int64_t*>(&value));
113 vst1q_s64(reinterpret_cast<int64_t*>(&_value), v);
114#else
115 // RISC-V and other architectures use mutex fallback
116 BAIDU_SCOPED_LOCK(const_cast<FastPthreadMutex&>(_mutex));
117 _value = value;
118#endif // __x86_64__ || __ARM_NEON
119}
120
121
122int TaskGroup::get_attr(bthread_t tid, bthread_attr_t* out) {

Callers 15

run_and_deleteMethod · 0.45
stop_and_joinMethod · 0.45
bthread_once_tMethod · 0.45
bthread_once_implFunction · 0.45
pushMethod · 0.45
popMethod · 0.45
wakeup_pthreadFunction · 0.45
butex_wakeFunction · 0.45
butex_wake_nFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected