| 105 | } |
| 106 | |
| 107 | void 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 | |
| 122 | int TaskGroup::get_attr(bthread_t tid, bthread_attr_t* out) { |
no outgoing calls
no test coverage detected