提交 4c9d2b10 编写于 作者: A Aaron Gao 提交者: Facebook Github Bot

remove #include port/port.h in public header file

Summary:
break internal build
Closes https://github.com/facebook/rocksdb/pull/2336

Differential Revision: D5097089

Pulled By: lightmark

fbshipit-source-id: 6996cbadeead21074a41e526ea04659190ee61d8
上级 07bdcb91
......@@ -7,7 +7,6 @@
#include <stdint.h>
#include <string>
#include "port/port.h"
#include "rocksdb/perf_level.h"
// A thread local context for gathering io-stats efficiently and transparently.
......@@ -48,7 +47,12 @@ struct IOStatsContext {
};
#ifdef ROCKSDB_SUPPORT_THREAD_LOCAL
extern __thread IOStatsContext iostats_context;
#if defined(_MSC_VER) && !defined(__thread)
// Thread local storage on Linux
// There is thread_local in C++11
#define __thread __declspec(thread)
#endif
extern __thread IOStatsContext iostats_context;
#endif
} // namespace rocksdb
......@@ -9,7 +9,6 @@
#include <stdint.h>
#include <string>
#include "port/port.h"
#include "rocksdb/perf_level.h"
namespace rocksdb {
......@@ -158,6 +157,11 @@ extern PerfContext perf_context;
PerfContext *getPerfContext();
#define perf_context (*getPerfContext())
#else
#if defined(_MSC_VER) && !defined(__thread)
// Thread local storage on Linux
// There is thread_local in C++11
#define __thread __declspec(thread)
#endif
extern __thread PerfContext perf_context;
#endif
#endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册