YugabyteDB (2.13.1.0-b60, 21121d69985fbf76aa6958d8f04a9bfa936293b5)

Coverage Report

Created: 2022-03-22 16:43

/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
46.0M
AtomicInt<T>::AtomicInt(T initial_value) {
43
46.0M
  Store(initial_value, kMemOrderNoBarrier);
44
46.0M
}
yb::AtomicInt<int>::AtomicInt(int)
Line
Count
Source
42
12.1M
AtomicInt<T>::AtomicInt(T initial_value) {
43
12.1M
  Store(initial_value, kMemOrderNoBarrier);
44
12.1M
}
yb::AtomicInt<long long>::AtomicInt(long long)
Line
Count
Source
42
33.8M
AtomicInt<T>::AtomicInt(T initial_value) {
43
33.8M
  Store(initial_value, kMemOrderNoBarrier);
44
33.8M
}
yb::AtomicInt<unsigned int>::AtomicInt(unsigned int)
Line
Count
Source
42
11
AtomicInt<T>::AtomicInt(T initial_value) {
43
11
  Store(initial_value, kMemOrderNoBarrier);
44
11
}
yb::AtomicInt<unsigned long long>::AtomicInt(unsigned long long)
Line
Count
Source
42
46.8k
AtomicInt<T>::AtomicInt(T initial_value) {
43
46.8k
  Store(initial_value, kMemOrderNoBarrier);
44
46.8k
}
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: yb::AtomicInt<int>::FatalMemOrderNotSupported(char const*, char const*, char const*)
Unexecuted instantiation: yb::AtomicInt<long long>::FatalMemOrderNotSupported(char const*, char const*, char const*)
Unexecuted instantiation: yb::AtomicInt<unsigned int>::FatalMemOrderNotSupported(char const*, char const*, char const*)
Unexecuted instantiation: yb::AtomicInt<unsigned long long>::FatalMemOrderNotSupported(char const*, char const*, char const*)
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
12.0M
    : underlying_(value) {
68
12.0M
}
69
70
} // namespace yb