hotspot/src/os/posix/vm/os_posix.cpp
changeset 40010 e32d5e545789
parent 38263 a7488329ad27
child 40383 1ebc8c5aed30
--- a/hotspot/src/os/posix/vm/os_posix.cpp	Mon Jul 25 18:52:59 2016 +0000
+++ b/hotspot/src/os/posix/vm/os_posix.cpp	Wed Jul 13 12:23:05 2016 +0200
@@ -28,6 +28,7 @@
 #include "runtime/frame.inline.hpp"
 #include "runtime/interfaceSupport.hpp"
 #include "runtime/os.hpp"
+#include "utilities/macros.hpp"
 #include "utilities/vmError.hpp"
 
 #include <signal.h>
@@ -214,7 +215,7 @@
   else st->print("%luk", rlim.rlim_cur >> 10);
 
   // Isn't there on solaris
-#if !defined(TARGET_OS_FAMILY_solaris) && !defined(TARGET_OS_FAMILY_aix)
+#if !defined(SOLARIS) && !defined(AIX)
   st->print(", NPROC ");
   getrlimit(RLIMIT_NPROC, &rlim);
   if (rlim.rlim_cur == RLIM_INFINITY) st->print("infinity");
@@ -1062,28 +1063,28 @@
 }
 
 address os::Posix::ucontext_get_pc(const ucontext_t* ctx) {
-#ifdef TARGET_OS_FAMILY_linux
+#if defined(AIX)
+   return Aix::ucontext_get_pc(ctx);
+#elif defined(BSD)
+   return Bsd::ucontext_get_pc(ctx);
+#elif defined(LINUX)
    return Linux::ucontext_get_pc(ctx);
-#elif defined(TARGET_OS_FAMILY_solaris)
+#elif defined(SOLARIS)
    return Solaris::ucontext_get_pc(ctx);
-#elif defined(TARGET_OS_FAMILY_aix)
-   return Aix::ucontext_get_pc(ctx);
-#elif defined(TARGET_OS_FAMILY_bsd)
-   return Bsd::ucontext_get_pc(ctx);
 #else
    VMError::report_and_die("unimplemented ucontext_get_pc");
 #endif
 }
 
 void os::Posix::ucontext_set_pc(ucontext_t* ctx, address pc) {
-#ifdef TARGET_OS_FAMILY_linux
+#if defined(AIX)
+   Aix::ucontext_set_pc(ctx, pc);
+#elif defined(BSD)
+   Bsd::ucontext_set_pc(ctx, pc);
+#elif defined(LINUX)
    Linux::ucontext_set_pc(ctx, pc);
-#elif defined(TARGET_OS_FAMILY_solaris)
+#elif defined(SOLARIS)
    Solaris::ucontext_set_pc(ctx, pc);
-#elif defined(TARGET_OS_FAMILY_aix)
-   Aix::ucontext_set_pc(ctx, pc);
-#elif defined(TARGET_OS_FAMILY_bsd)
-   Bsd::ucontext_set_pc(ctx, pc);
 #else
    VMError::report_and_die("unimplemented ucontext_get_pc");
 #endif