-// Note: Using pthread_t (that is, threadid_t on POSIX platforms) as the key to
-// a std::map is naughty. Formally, a pthread_t may only be compared using
-// pthread_equal() - pthread_t lacks the well-ordered property needed for
-// comparisons in binary searches. This should be fixed at some point by
-// defining a custom comparator with an arbitrary but stable ordering of
-// pthread_t, but it isn't too important since none of our supported platforms
-// implement pthread_t as a non-ordinal type.
-std::map<threadid_t, DebugStack*> g_debug_stacks;
-Mutex g_debug_stacks_mutex;
-
-void debug_stacks_init()
-{
-}
+std::map<std::thread::id, DebugStack*> g_debug_stacks;
+std::mutex g_debug_stacks_mutex;