comparison src/share/vm/runtime/os.hpp @ 17706:0e6af9b390af

8028280: ParkEvent leak when running modified runThese which only loads classes Summary: Use spin lock to manage ParkEvent and PlatformEvent free lists. Reviewed-by: dholmes, fparain, dcubed, acorn
author dsimms
date Fri, 24 Jan 2014 09:28:47 +0100
parents da051ce490eb
children 2c95095271e9 62c54fcc0a35
comparison
equal deleted inserted replaced
17705:ba2cf1fc862b 17706:0e6af9b390af
428 428
429 // thread id on Linux/64bit is 64bit, on Windows and Solaris, it's 32bit 429 // thread id on Linux/64bit is 64bit, on Windows and Solaris, it's 32bit
430 static intx current_thread_id(); 430 static intx current_thread_id();
431 static int current_process_id(); 431 static int current_process_id();
432 static int sleep(Thread* thread, jlong ms, bool interruptable); 432 static int sleep(Thread* thread, jlong ms, bool interruptable);
433 static int naked_sleep(); 433 // Short standalone OS sleep suitable for slow path spin loop.
434 // Ignores Thread.interrupt() (so keep it short).
435 // ms = 0, will sleep for the least amount of time allowed by the OS.
436 static void naked_short_sleep(jlong ms);
434 static void infinite_sleep(); // never returns, use with CAUTION 437 static void infinite_sleep(); // never returns, use with CAUTION
435 static void yield(); // Yields to all threads with same priority 438 static void yield(); // Yields to all threads with same priority
436 enum YieldResult { 439 enum YieldResult {
437 YIELD_SWITCHED = 1, // caller descheduled, other ready threads exist & ran 440 YIELD_SWITCHED = 1, // caller descheduled, other ready threads exist & ran
438 YIELD_NONEREADY = 0, // No other runnable/ready threads. 441 YIELD_NONEREADY = 0, // No other runnable/ready threads.