comparison src/share/vm/runtime/os.hpp @ 18041:52b4284cb496

Merge with jdk8u20-b26
author Gilles Duboscq <duboscq@ssw.jku.at>
date Wed, 15 Oct 2014 16:02:50 +0200
parents 3eed8712d410 f73af4455d7d
children 7848fc12602b
comparison
equal deleted inserted replaced
17606:45d7b2c7029d 18041:52b4284cb496
39 # include <setjmp.h> 39 # include <setjmp.h>
40 #endif 40 #endif
41 #ifdef TARGET_OS_FAMILY_windows 41 #ifdef TARGET_OS_FAMILY_windows
42 # include "jvm_windows.h" 42 # include "jvm_windows.h"
43 #endif 43 #endif
44 #ifdef TARGET_OS_FAMILY_aix
45 # include "jvm_aix.h"
46 # include <setjmp.h>
47 #endif
44 #ifdef TARGET_OS_FAMILY_bsd 48 #ifdef TARGET_OS_FAMILY_bsd
45 # include "jvm_bsd.h" 49 # include "jvm_bsd.h"
46 # include <setjmp.h> 50 # include <setjmp.h>
51 # ifdef __APPLE__
52 # include <mach/mach_time.h>
53 # endif
47 #endif 54 #endif
48 55
49 class AgentLibrary; 56 class AgentLibrary;
50 57
51 // os defines the interface to operating system; this includes traditional 58 // os defines the interface to operating system; this includes traditional
431 438
432 // thread id on Linux/64bit is 64bit, on Windows and Solaris, it's 32bit 439 // thread id on Linux/64bit is 64bit, on Windows and Solaris, it's 32bit
433 static intx current_thread_id(); 440 static intx current_thread_id();
434 static int current_process_id(); 441 static int current_process_id();
435 static int sleep(Thread* thread, jlong ms, bool interruptable); 442 static int sleep(Thread* thread, jlong ms, bool interruptable);
436 static int naked_sleep(); 443 // Short standalone OS sleep suitable for slow path spin loop.
444 // Ignores Thread.interrupt() (so keep it short).
445 // ms = 0, will sleep for the least amount of time allowed by the OS.
446 static void naked_short_sleep(jlong ms);
437 static void infinite_sleep(); // never returns, use with CAUTION 447 static void infinite_sleep(); // never returns, use with CAUTION
438 static void yield(); // Yields to all threads with same priority 448 static void yield(); // Yields to all threads with same priority
439 enum YieldResult { 449 enum YieldResult {
440 YIELD_SWITCHED = 1, // caller descheduled, other ready threads exist & ran 450 YIELD_SWITCHED = 1, // caller descheduled, other ready threads exist & ran
441 YIELD_NONEREADY = 0, // No other runnable/ready threads. 451 YIELD_NONEREADY = 0, // No other runnable/ready threads.
770 # include "os_posix.hpp" 780 # include "os_posix.hpp"
771 #endif 781 #endif
772 #ifdef TARGET_OS_FAMILY_windows 782 #ifdef TARGET_OS_FAMILY_windows
773 # include "os_windows.hpp" 783 # include "os_windows.hpp"
774 #endif 784 #endif
785 #ifdef TARGET_OS_FAMILY_aix
786 # include "os_aix.hpp"
787 # include "os_posix.hpp"
788 #endif
775 #ifdef TARGET_OS_FAMILY_bsd 789 #ifdef TARGET_OS_FAMILY_bsd
776 # include "os_posix.hpp" 790 # include "os_posix.hpp"
777 # include "os_bsd.hpp" 791 # include "os_bsd.hpp"
778 #endif 792 #endif
779 #ifdef TARGET_OS_ARCH_linux_x86 793 #ifdef TARGET_OS_ARCH_linux_x86
797 #ifdef TARGET_OS_ARCH_linux_arm 811 #ifdef TARGET_OS_ARCH_linux_arm
798 # include "os_linux_arm.hpp" 812 # include "os_linux_arm.hpp"
799 #endif 813 #endif
800 #ifdef TARGET_OS_ARCH_linux_ppc 814 #ifdef TARGET_OS_ARCH_linux_ppc
801 # include "os_linux_ppc.hpp" 815 # include "os_linux_ppc.hpp"
816 #endif
817 #ifdef TARGET_OS_ARCH_aix_ppc
818 # include "os_aix_ppc.hpp"
802 #endif 819 #endif
803 #ifdef TARGET_OS_ARCH_bsd_x86 820 #ifdef TARGET_OS_ARCH_bsd_x86
804 # include "os_bsd_x86.hpp" 821 # include "os_bsd_x86.hpp"
805 #endif 822 #endif
806 #ifdef TARGET_OS_ARCH_bsd_zero 823 #ifdef TARGET_OS_ARCH_bsd_zero