src/share/vm/runtime/os.hpp

changeset 6518
62c54fcc0a35
parent 6472
2b8e28fdf503
parent 6348
0e6af9b390af
child 6667
917873d2983d
child 6779
364b73402247
equal deleted inserted replaced
6517:a433eb716ce1 6518:62c54fcc0a35
432 432
433 // thread id on Linux/64bit is 64bit, on Windows and Solaris, it's 32bit 433 // thread id on Linux/64bit is 64bit, on Windows and Solaris, it's 32bit
434 static intx current_thread_id(); 434 static intx current_thread_id();
435 static int current_process_id(); 435 static int current_process_id();
436 static int sleep(Thread* thread, jlong ms, bool interruptable); 436 static int sleep(Thread* thread, jlong ms, bool interruptable);
437 static int naked_sleep(); 437 // Short standalone OS sleep suitable for slow path spin loop.
438 // Ignores Thread.interrupt() (so keep it short).
439 // ms = 0, will sleep for the least amount of time allowed by the OS.
440 static void naked_short_sleep(jlong ms);
438 static void infinite_sleep(); // never returns, use with CAUTION 441 static void infinite_sleep(); // never returns, use with CAUTION
439 static void yield(); // Yields to all threads with same priority 442 static void yield(); // Yields to all threads with same priority
440 enum YieldResult { 443 enum YieldResult {
441 YIELD_SWITCHED = 1, // caller descheduled, other ready threads exist & ran 444 YIELD_SWITCHED = 1, // caller descheduled, other ready threads exist & ran
442 YIELD_NONEREADY = 0, // No other runnable/ready threads. 445 YIELD_NONEREADY = 0, // No other runnable/ready threads.

mercurial