/Users/deen/code/yugabyte-db/src/yb/util/atomic.cc
Line | Count | Source (jump to first uncovered line) |
1 | | // Licensed to the Apache Software Foundation (ASF) under one |
2 | | // or more contributor license agreements. See the NOTICE file |
3 | | // distributed with this work for additional information |
4 | | // regarding copyright ownership. The ASF licenses this file |
5 | | // to you under the Apache License, Version 2.0 (the |
6 | | // "License"); you may not use this file except in compliance |
7 | | // with the License. You may obtain a copy of the License at |
8 | | // |
9 | | // http://www.apache.org/licenses/LICENSE-2.0 |
10 | | // |
11 | | // Unless required by applicable law or agreed to in writing, |
12 | | // software distributed under the License is distributed on an |
13 | | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
14 | | // KIND, either express or implied. See the License for the |
15 | | // specific language governing permissions and limitations |
16 | | // under the License. |
17 | | // |
18 | | // The following only applies to changes made to this file as part of YugaByte development. |
19 | | // |
20 | | // Portions Copyright (c) YugaByte, Inc. |
21 | | // |
22 | | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except |
23 | | // in compliance with the License. You may obtain a copy of the License at |
24 | | // |
25 | | // http://www.apache.org/licenses/LICENSE-2.0 |
26 | | // |
27 | | // Unless required by applicable law or agreed to in writing, software distributed under the License |
28 | | // is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express |
29 | | // or implied. See the License for the specific language governing permissions and limitations |
30 | | // under the License. |
31 | | // |
32 | | |
33 | | #include "yb/util/atomic.h" |
34 | | |
35 | | #include <stdint.h> |
36 | | |
37 | | #include <glog/logging.h> |
38 | | |
39 | | namespace yb { |
40 | | |
41 | | template<typename T> |
42 | 28.9M | AtomicInt<T>::AtomicInt(T initial_value) { |
43 | 28.9M | Store(initial_value, kMemOrderNoBarrier); |
44 | 28.9M | } Line | Count | Source | 42 | 7.83M | AtomicInt<T>::AtomicInt(T initial_value) { | 43 | 7.83M | Store(initial_value, kMemOrderNoBarrier); | 44 | 7.83M | } |
Line | Count | Source | 42 | 21.0M | AtomicInt<T>::AtomicInt(T initial_value) { | 43 | 21.0M | Store(initial_value, kMemOrderNoBarrier); | 44 | 21.0M | } |
Line | Count | Source | 42 | 11 | AtomicInt<T>::AtomicInt(T initial_value) { | 43 | 11 | Store(initial_value, kMemOrderNoBarrier); | 44 | 11 | } |
Line | Count | Source | 42 | 32.0k | AtomicInt<T>::AtomicInt(T initial_value) { | 43 | 32.0k | Store(initial_value, kMemOrderNoBarrier); | 44 | 32.0k | } |
|
45 | | |
46 | | template<typename T> |
47 | | void AtomicInt<T>::FatalMemOrderNotSupported(const char* caller, |
48 | | const char* requested, |
49 | 0 | const char* supported) { |
50 | 0 | LOG(FATAL) << caller << " does not support " << requested << ": only " |
51 | 0 | << supported << " are supported."; |
52 | 0 | } Unexecuted instantiation: _ZN2yb9AtomicIntIiE25FatalMemOrderNotSupportedEPKcS3_S3_ Unexecuted instantiation: _ZN2yb9AtomicIntIxE25FatalMemOrderNotSupportedEPKcS3_S3_ Unexecuted instantiation: _ZN2yb9AtomicIntIjE25FatalMemOrderNotSupportedEPKcS3_S3_ Unexecuted instantiation: _ZN2yb9AtomicIntIyE25FatalMemOrderNotSupportedEPKcS3_S3_ |
53 | | |
54 | | template |
55 | | class AtomicInt<int32_t>; |
56 | | |
57 | | template |
58 | | class AtomicInt<int64_t>; |
59 | | |
60 | | template |
61 | | class AtomicInt<uint32_t>; |
62 | | |
63 | | template |
64 | | class AtomicInt<uint64_t>; |
65 | | |
66 | | AtomicBool::AtomicBool(bool value) |
67 | 7.81M | : underlying_(value) { |
68 | 7.81M | } |
69 | | |
70 | | } // namespace yb |