]> git.proxmox.com Git - ceph.git/blob - ceph/src/rocksdb/util/sync_point.cc
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / rocksdb / util / sync_point.cc
1 // Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
2 // This source code is licensed under both the GPLv2 (found in the
3 // COPYING file in the root directory) and Apache 2.0 License
4 // (found in the LICENSE.Apache file in the root directory).
5
6 #include "util/sync_point.h"
7 #include "util/sync_point_impl.h"
8
9 int rocksdb_kill_odds = 0;
10 std::vector<std::string> rocksdb_kill_prefix_blacklist;
11
12 #ifndef NDEBUG
13 namespace rocksdb {
14
15 SyncPoint* SyncPoint::GetInstance() {
16 static SyncPoint sync_point;
17 return &sync_point;
18 }
19
20 SyncPoint::SyncPoint() :
21 impl_(new Data) {
22 }
23
24 SyncPoint:: ~SyncPoint() {
25 delete impl_;
26 }
27
28 void SyncPoint::LoadDependency(const std::vector<SyncPointPair>& dependencies) {
29 impl_->LoadDependency(dependencies);
30 }
31
32 void SyncPoint::LoadDependencyAndMarkers(
33 const std::vector<SyncPointPair>& dependencies,
34 const std::vector<SyncPointPair>& markers) {
35 impl_->LoadDependencyAndMarkers(dependencies, markers);
36 }
37
38 void SyncPoint::SetCallBack(const std::string& point,
39 const std::function<void(void*)>& callback) {
40 impl_->SetCallBack(point, callback);
41 }
42
43 void SyncPoint::ClearCallBack(const std::string& point) {
44 impl_->ClearCallBack(point);
45 }
46
47 void SyncPoint::ClearAllCallBacks() {
48 impl_->ClearAllCallBacks();
49 }
50
51 void SyncPoint::EnableProcessing() {
52 impl_->EnableProcessing();
53 }
54
55 void SyncPoint::DisableProcessing() {
56 impl_->DisableProcessing();
57 }
58
59 void SyncPoint::ClearTrace() {
60 impl_->ClearTrace();
61 }
62
63 void SyncPoint::Process(const std::string& point, void* cb_arg) {
64 impl_->Process(point, cb_arg);
65 }
66
67 } // namespace rocksdb
68 #endif // NDEBUG