< prev index next >
src/share/vm/runtime/os.hpp
Print this page
rev 11647 : 8161258: Simplify including platform files.
Summary: Include patform files with macros cpu_header() etc. Do various cleanups of macro usages. Remove _64/_32 from adlc generated files and platform .hpp files. Merge stubRoutines_x86*.hpp. Remove empty mutex_<os>* files.
Reviewed-by: dholmes, coleenp, kbarrett
@@ -24,33 +24,19 @@
#ifndef SHARE_VM_RUNTIME_OS_HPP
#define SHARE_VM_RUNTIME_OS_HPP
#include "jvmtifiles/jvmti.h"
+#include "prims/jvm.h"
#include "runtime/extendedPC.hpp"
#include "runtime/handles.hpp"
-#ifdef TARGET_OS_FAMILY_linux
-# include "jvm_linux.h"
+#include "utilities/macros.hpp"
+#ifndef _WINDOWS
# include <setjmp.h>
#endif
-#ifdef TARGET_OS_FAMILY_solaris
-# include "jvm_solaris.h"
-# include <setjmp.h>
-#endif
-#ifdef TARGET_OS_FAMILY_windows
-# include "jvm_windows.h"
-#endif
-#ifdef TARGET_OS_FAMILY_aix
-# include "jvm_aix.h"
-# include <setjmp.h>
-#endif
-#ifdef TARGET_OS_FAMILY_bsd
-# include "jvm_bsd.h"
-# include <setjmp.h>
-# ifdef __APPLE__
+#ifdef __APPLE__
# include <mach/mach_time.h>
-# endif
#endif
class AgentLibrary;
// os defines the interface to operating system; this includes traditional
@@ -814,65 +800,15 @@
public:
virtual void call() = 0;
};
// Platform dependent stuff
-#ifdef TARGET_OS_FAMILY_linux
-# include "os_linux.hpp"
-# include "os_posix.hpp"
-#endif
-#ifdef TARGET_OS_FAMILY_solaris
-# include "os_solaris.hpp"
-# include "os_posix.hpp"
-#endif
-#ifdef TARGET_OS_FAMILY_windows
-# include "os_windows.hpp"
-#endif
-#ifdef TARGET_OS_FAMILY_aix
-# include "os_aix.hpp"
-# include "os_posix.hpp"
-#endif
-#ifdef TARGET_OS_FAMILY_bsd
+#ifndef _WINDOWS
# include "os_posix.hpp"
-# include "os_bsd.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_linux_x86
-# include "os_linux_x86.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_linux_sparc
-# include "os_linux_sparc.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_linux_zero
-# include "os_linux_zero.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_solaris_x86
-# include "os_solaris_x86.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_solaris_sparc
-# include "os_solaris_sparc.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_windows_x86
-# include "os_windows_x86.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_linux_arm
-# include "os_linux_arm.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_linux_ppc
-# include "os_linux_ppc.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_aix_ppc
-# include "os_aix_ppc.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_linux_aarch64
-# include "os_linux_aarch64.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_bsd_x86
-# include "os_bsd_x86.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_bsd_zero
-# include "os_bsd_zero.hpp"
#endif
+#include OS_CPU_HEADER(os)
+#include OS_HEADER(os)
#ifndef OS_NATIVE_THREAD_CREATION_FAILED_MSG
#define OS_NATIVE_THREAD_CREATION_FAILED_MSG "unable to create native thread: possibly out of memory or process/resource limits reached"
#endif
@@ -935,11 +871,11 @@
void internal_do_task();
Thread* _thread;
bool _done;
};
-#ifndef TARGET_OS_FAMILY_windows
+#ifndef _WINDOWS
// Suspend/resume support
// Protocol:
//
// a thread starts in SR_RUNNING
//
@@ -1006,11 +942,11 @@
bool is_suspended() const {
return _state == SR_SUSPENDED;
}
};
-#endif
+#endif // !WINDOWS
protected:
static long _rand_seed; // seed for random number generator
static int _processor_count; // number of processors
< prev index next >