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

Method load

src/bthread/task_group.cpp:87–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85const TaskStatistics EMPTY_STAT = { 0, 0, 0 };
86
87AtomicInteger128::Value AtomicInteger128::load() const {
88#if __x86_64__ || __ARM_NEON
89 // Supress compiler warning.
90 (void)_mutex;
91#endif // __x86_64__ || __ARM_NEON
92
93#if __x86_64__ || __ARM_NEON
94#ifdef __x86_64__
95 __m128i value = _mm_load_si128(reinterpret_cast<const __m128i*>(&_value));
96#else // __ARM_NEON
97 int64x2_t value = vld1q_s64(reinterpret_cast<const int64_t*>(&_value));
98#endif // __x86_64__
99 return {value[0], value[1]};
100#else // __x86_64__ || __ARM_NEON
101 // RISC-V and other architectures use mutex fallback
102 BAIDU_SCOPED_LOCK(const_cast<FastPthreadMutex&>(_mutex));
103 return _value;
104#endif // __x86_64__ || __ARM_NEON
105}
106
107void AtomicInteger128::store(Value value) {
108#if __x86_64__

Callers 15

GenerateTokenFunction · 0.45
SendRequestMethod · 0.45
HandleResponseMethod · 0.45
TestFunction · 0.45
TestMethod · 0.45
aggregate_statsMethod · 0.45
thread_workerFunction · 0.45
print_statsFunction · 0.45
EchoMethod · 0.45
RunCaseFunction · 0.45
EchoMethod · 0.45
mainFunction · 0.45

Calls

no outgoing calls

Tested by 15

TestFunction · 0.36
TestMethod · 0.36
TESTFunction · 0.36
TESTFunction · 0.36
print_funcFunction · 0.36
TEST_FFunction · 0.36
TESTFunction · 0.36
TESTFunction · 0.36
TestAuthenticationMethod · 0.36