hotspot/src/share/vm/runtime/os.hpp
changeset 22533 76088853a2eb
parent 20022 e6e3f5ff6d73
child 22556 a17351e8c2c2
equal deleted inserted replaced
22532:1fc87ea15795 22533:76088853a2eb
   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.