fork of https://github.com/oxigraph/rocksdb and https://github.com/facebook/rocksdb for nextgraph and oxigraph
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
67 lines
1.6 KiB
67 lines
1.6 KiB
9 years ago
|
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
|
||
8 years ago
|
// This source code is licensed under both the GPLv2 (found in the
|
||
|
// COPYING file in the root directory) and Apache 2.0 License
|
||
|
// (found in the LICENSE.Apache file in the root directory).
|
||
11 years ago
|
|
||
6 years ago
|
#include "test_util/sync_point.h"
|
||
|
#include "test_util/sync_point_impl.h"
|
||
10 years ago
|
|
||
|
int rocksdb_kill_odds = 0;
|
||
9 years ago
|
std::vector<std::string> rocksdb_kill_prefix_blacklist;
|
||
11 years ago
|
|
||
11 years ago
|
#ifndef NDEBUG
|
||
11 years ago
|
namespace rocksdb {
|
||
|
|
||
|
SyncPoint* SyncPoint::GetInstance() {
|
||
|
static SyncPoint sync_point;
|
||
|
return &sync_point;
|
||
|
}
|
||
|
|
||
6 years ago
|
SyncPoint::SyncPoint() : impl_(new Data) {}
|
||
11 years ago
|
|
||
7 years ago
|
SyncPoint:: ~SyncPoint() {
|
||
|
delete impl_;
|
||
9 years ago
|
}
|
||
|
|
||
7 years ago
|
void SyncPoint::LoadDependency(const std::vector<SyncPointPair>& dependencies) {
|
||
|
impl_->LoadDependency(dependencies);
|
||
11 years ago
|
}
|
||
|
|
||
7 years ago
|
void SyncPoint::LoadDependencyAndMarkers(
|
||
|
const std::vector<SyncPointPair>& dependencies,
|
||
|
const std::vector<SyncPointPair>& markers) {
|
||
|
impl_->LoadDependencyAndMarkers(dependencies, markers);
|
||
10 years ago
|
}
|
||
|
|
||
7 years ago
|
void SyncPoint::SetCallBack(const std::string& point,
|
||
|
const std::function<void(void*)>& callback) {
|
||
|
impl_->SetCallBack(point, callback);
|
||
|
}
|
||
|
|
||
|
void SyncPoint::ClearCallBack(const std::string& point) {
|
||
|
impl_->ClearCallBack(point);
|
||
8 years ago
|
}
|
||
|
|
||
10 years ago
|
void SyncPoint::ClearAllCallBacks() {
|
||
7 years ago
|
impl_->ClearAllCallBacks();
|
||
10 years ago
|
}
|
||
|
|
||
11 years ago
|
void SyncPoint::EnableProcessing() {
|
||
7 years ago
|
impl_->EnableProcessing();
|
||
11 years ago
|
}
|
||
|
|
||
|
void SyncPoint::DisableProcessing() {
|
||
7 years ago
|
impl_->DisableProcessing();
|
||
11 years ago
|
}
|
||
|
|
||
|
void SyncPoint::ClearTrace() {
|
||
7 years ago
|
impl_->ClearTrace();
|
||
9 years ago
|
}
|
||
|
|
||
10 years ago
|
void SyncPoint::Process(const std::string& point, void* cb_arg) {
|
||
7 years ago
|
impl_->Process(point, cb_arg);
|
||
11 years ago
|
}
|
||
7 years ago
|
|
||
11 years ago
|
} // namespace rocksdb
|
||
11 years ago
|
#endif // NDEBUG
|