20 * or visit www.oracle.com if you need additional information or have any |
20 * or visit www.oracle.com if you need additional information or have any |
21 * questions. |
21 * questions. |
22 * |
22 * |
23 */ |
23 */ |
24 |
24 |
|
25 #ifndef SHARE_VM_RUNTIME_OS_HPP |
|
26 #define SHARE_VM_RUNTIME_OS_HPP |
|
27 |
|
28 #include "jvmtifiles/jvmti.h" |
|
29 #include "runtime/atomic.hpp" |
|
30 #include "runtime/extendedPC.hpp" |
|
31 #include "runtime/handles.hpp" |
|
32 #include "utilities/top.hpp" |
|
33 #ifdef TARGET_OS_FAMILY_linux |
|
34 # include "jvm_linux.h" |
|
35 #endif |
|
36 #ifdef TARGET_OS_FAMILY_solaris |
|
37 # include "jvm_solaris.h" |
|
38 #endif |
|
39 #ifdef TARGET_OS_FAMILY_windows |
|
40 # include "jvm_windows.h" |
|
41 #endif |
|
42 |
25 // os defines the interface to operating system; this includes traditional |
43 // os defines the interface to operating system; this includes traditional |
26 // OS services (time, I/O) as well as other functionality with system- |
44 // OS services (time, I/O) as well as other functionality with system- |
27 // dependent code. |
45 // dependent code. |
28 |
46 |
29 typedef void (*dll_func)(...); |
47 typedef void (*dll_func)(...); |
585 |
603 |
586 // Hook for os specific jvm options that we don't want to abort on seeing |
604 // Hook for os specific jvm options that we don't want to abort on seeing |
587 static bool obsolete_option(const JavaVMOption *option); |
605 static bool obsolete_option(const JavaVMOption *option); |
588 |
606 |
589 // Platform dependent stuff |
607 // Platform dependent stuff |
590 #include "incls/_os_pd.hpp.incl" |
608 #ifdef TARGET_OS_FAMILY_linux |
|
609 # include "os_linux.hpp" |
|
610 #endif |
|
611 #ifdef TARGET_OS_FAMILY_solaris |
|
612 # include "os_solaris.hpp" |
|
613 #endif |
|
614 #ifdef TARGET_OS_FAMILY_windows |
|
615 # include "os_windows.hpp" |
|
616 #endif |
|
617 #ifdef TARGET_OS_ARCH_linux_x86 |
|
618 # include "os_linux_x86.hpp" |
|
619 #endif |
|
620 #ifdef TARGET_OS_ARCH_linux_sparc |
|
621 # include "os_linux_sparc.hpp" |
|
622 #endif |
|
623 #ifdef TARGET_OS_ARCH_linux_zero |
|
624 # include "os_linux_zero.hpp" |
|
625 #endif |
|
626 #ifdef TARGET_OS_ARCH_solaris_x86 |
|
627 # include "os_solaris_x86.hpp" |
|
628 #endif |
|
629 #ifdef TARGET_OS_ARCH_solaris_sparc |
|
630 # include "os_solaris_sparc.hpp" |
|
631 #endif |
|
632 #ifdef TARGET_OS_ARCH_windows_x86 |
|
633 # include "os_windows_x86.hpp" |
|
634 #endif |
|
635 |
591 |
636 |
592 // debugging support (mostly used by debug.cpp but also fatal error handler) |
637 // debugging support (mostly used by debug.cpp but also fatal error handler) |
593 static bool find(address pc, outputStream* st = tty); // OS specific function to make sense out of an address |
638 static bool find(address pc, outputStream* st = tty); // OS specific function to make sense out of an address |
594 |
639 |
595 static bool dont_yield(); // when true, JVM_Yield() is nop |
640 static bool dont_yield(); // when true, JVM_Yield() is nop |
628 // It'd also be eligible for inlining on many platforms. |
673 // It'd also be eligible for inlining on many platforms. |
629 |
674 |
630 extern "C" int SpinPause () ; |
675 extern "C" int SpinPause () ; |
631 extern "C" int SafeFetch32 (int * adr, int errValue) ; |
676 extern "C" int SafeFetch32 (int * adr, int errValue) ; |
632 extern "C" intptr_t SafeFetchN (intptr_t * adr, intptr_t errValue) ; |
677 extern "C" intptr_t SafeFetchN (intptr_t * adr, intptr_t errValue) ; |
|
678 |
|
679 #endif // SHARE_VM_RUNTIME_OS_HPP |