diff 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
line wrap: on
line diff
--- a/src/share/vm/runtime/os.hpp	Fri Feb 14 09:50:17 2014 -0800
+++ b/src/share/vm/runtime/os.hpp	Fri Jan 24 09:28:47 2014 +0100
@@ -430,7 +430,10 @@
   static intx current_thread_id();
   static int current_process_id();
   static int sleep(Thread* thread, jlong ms, bool interruptable);
-  static int naked_sleep();
+  // Short standalone OS sleep suitable for slow path spin loop.
+  // Ignores Thread.interrupt() (so keep it short).
+  // ms = 0, will sleep for the least amount of time allowed by the OS.
+  static void naked_short_sleep(jlong ms);
   static void infinite_sleep(); // never returns, use with CAUTION
   static void yield();        // Yields to all threads with same priority
   enum YieldResult {