1.1 --- a/src/os/linux/vm/os_linux.cpp Fri Dec 16 11:40:00 2011 -0800 1.2 +++ b/src/os/linux/vm/os_linux.cpp Mon Dec 19 10:02:05 2011 -0800 1.3 @@ -127,7 +127,6 @@ 1.4 1.5 // for timer info max values which include all bits 1.6 #define ALL_64_BITS CONST64(0xFFFFFFFFFFFFFFFF) 1.7 -#define SEC_IN_NANOSECS 1000000000LL 1.8 1.9 #define LARGEPAGES_BIT (1 << 6) 1.10 //////////////////////////////////////////////////////////////////////////////// 1.11 @@ -3259,8 +3258,6 @@ 1.12 // generates a SIGUSRx signal. Note that SIGUSR1 can interfere with 1.13 // SIGSEGV, see 4355769. 1.14 1.15 -const int NANOSECS_PER_MILLISECS = 1000000; 1.16 - 1.17 int os::sleep(Thread* thread, jlong millis, bool interruptible) { 1.18 assert(thread == Thread::current(), "thread consistency check"); 1.19 1.20 @@ -3283,7 +3280,7 @@ 1.21 // not a guarantee() because JVM should not abort on kernel/glibc bugs 1.22 assert(!Linux::supports_monotonic_clock(), "time moving backwards"); 1.23 } else { 1.24 - millis -= (newtime - prevtime) / NANOSECS_PER_MILLISECS; 1.25 + millis -= (newtime - prevtime) / NANOSECS_PER_MILLISEC; 1.26 } 1.27 1.28 if(millis <= 0) { 1.29 @@ -3322,7 +3319,7 @@ 1.30 // not a guarantee() because JVM should not abort on kernel/glibc bugs 1.31 assert(!Linux::supports_monotonic_clock(), "time moving backwards"); 1.32 } else { 1.33 - millis -= (newtime - prevtime) / NANOSECS_PER_MILLISECS; 1.34 + millis -= (newtime - prevtime) / NANOSECS_PER_MILLISEC; 1.35 } 1.36 1.37 if(millis <= 0) break ; 1.38 @@ -3924,7 +3921,7 @@ 1.39 int rc = os::Linux::clock_gettime(clockid, &tp); 1.40 assert(rc == 0, "clock_gettime is expected to return 0 code"); 1.41 1.42 - return (tp.tv_sec * SEC_IN_NANOSECS) + tp.tv_nsec; 1.43 + return (tp.tv_sec * NANOSECS_PER_SEC) + tp.tv_nsec; 1.44 } 1.45 1.46 ///// 1.47 @@ -5165,9 +5162,6 @@ 1.48 * is no need to track notifications. 1.49 */ 1.50 1.51 - 1.52 -#define NANOSECS_PER_SEC 1000000000 1.53 -#define NANOSECS_PER_MILLISEC 1000000 1.54 #define MAX_SECS 100000000 1.55 /* 1.56 * This code is common to linux and solaris and will be moved to a