From: Kefu Chai Date: Sat, 24 Feb 2018 03:31:47 +0000 (+0800) Subject: common/lockdep: drop hash specialization X-Git-Tag: v13.0.2~194^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F20574%2Fhead;p=ceph.git common/lockdep: drop hash specialization quote from http://en.cppreference.com/w/cpp/utility/hash: > Each standard library header that declares the template std::hash > provides enabled specializations of std::hash for std::nullptr > and all cv-unqualified arithmetic types (including any extended > integer types), all enumeration types, and all pointer types. since we've switched to C++17. this full specialization is not necessary anymore. Signed-off-by: Kefu Chai --- diff --git a/src/common/lockdep.cc b/src/common/lockdep.cc index 9b00dcd6e3a0..cf0aba6dd4f5 100644 --- a/src/common/lockdep.cc +++ b/src/common/lockdep.cc @@ -15,18 +15,6 @@ #include "common/dout.h" #include "common/valgrind.h" -#if defined(__FreeBSD__) && defined(__LP64__) // On FreeBSD pthread_t is a pointer. -namespace std { - template<> - struct hash - { - size_t - operator()(pthread_t __x) const - { return (uintptr_t)__x; } - }; -} // namespace std -#endif - /******* Constants **********/ #define lockdep_dout(v) lsubdout(g_lockdep_ceph_ctx, lockdep, v) #define MAX_LOCKS 4096 // increase me as needed