src/hotspot/os/posix/os_posix.cpp
changeset 53077 33b8f6f4cdf5
parent 52585 f7f90fddce02
child 53266 57d8566a2732
equal deleted inserted replaced
53076:dd5d7ba5b539 53077:33b8f6f4cdf5
   693     }
   693     }
   694     return OS_OK ;
   694     return OS_OK ;
   695   }
   695   }
   696 }
   696 }
   697 
   697 
       
   698 void os::naked_short_nanosleep(jlong ns) {
       
   699   struct timespec req;
       
   700   assert(ns > -1 && ns < NANOUNITS, "Un-interruptable sleep, short time use only");
       
   701   req.tv_sec = 0;
       
   702   req.tv_nsec = ns;
       
   703   ::nanosleep(&req, NULL);
       
   704   return;
       
   705 }
       
   706 
       
   707 void os::naked_short_sleep(jlong ms) {
       
   708   assert(ms < MILLIUNITS, "Un-interruptable sleep, short time use only");
       
   709   os::naked_short_nanosleep(ms * (NANOUNITS / MILLIUNITS));
       
   710   return;
       
   711 }
       
   712 
   698 ////////////////////////////////////////////////////////////////////////////////
   713 ////////////////////////////////////////////////////////////////////////////////
   699 // interrupt support
   714 // interrupt support
   700 
   715 
   701 void os::interrupt(Thread* thread) {
   716 void os::interrupt(Thread* thread) {
   702   debug_only(Thread::check_for_dangling_thread_pointer(thread);)
   717   debug_only(Thread::check_for_dangling_thread_pointer(thread);)