]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commitdiff
Revert "remove #include port/port.h in public header file"
authorAaron Gao <gzh@fb.com>
Thu, 25 May 2017 01:18:24 +0000 (18:18 -0700)
committerAaron Gao <gzh@fb.com>
Thu, 25 May 2017 01:18:24 +0000 (18:18 -0700)
This reverts commit 4c9d2b10468146f42facb98fbc55d31501036d6a.

include/rocksdb/iostats_context.h
include/rocksdb/perf_context.h

index d0dbfa5fc278e0fa30014fb9035ba0010febb078..7be3afa591171dbbf68b0693488d8f24fa9736d4 100644 (file)
@@ -7,6 +7,7 @@
 #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.
@@ -47,12 +48,7 @@ struct IOStatsContext {
 };
 
 #ifdef ROCKSDB_SUPPORT_THREAD_LOCAL
-  #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;
+extern __thread IOStatsContext iostats_context;
 #endif
 
 }  // namespace rocksdb
index 785dfc7cda0732e404935bdcbe5f588e661aa5ca..e3c86c39cbe1045666a333b1a0836c9ae2c60f20 100644 (file)
@@ -9,6 +9,7 @@
 #include <stdint.h>
 #include <string>
 
+#include "port/port.h"
 #include "rocksdb/perf_level.h"
 
 namespace rocksdb {
@@ -157,11 +158,6 @@ 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