The be able to use Thread::current() we have to manually insert logic to include the correct thread_<os>.inline.hpp file. Like: #include "runtime/thread.hpp" #ifdef TARGET_OS_FAMILY_linux # include "thread_linux.inline.hpp" #endif #ifdef TARGET_OS_FAMILY_solaris # include "thread_solaris.inline.hpp" #endif #ifdef TARGET_OS_FAMILY_windows # include "thread_windows.inline.hpp" #endif #ifdef TARGET_OS_FAMILY_bsd # include "thread_bsd.inline.hpp" #endif I propose that we fold these into a new file called thread.inline.hpp, and always include that file instead.