32 #include "runtime/vmThread.hpp" 33 34 #include <signal.h> 35 36 // *************************************************************** 37 // Platform dependent initialization and cleanup 38 // *************************************************************** 39 40 void OSThread::pd_initialize() { 41 _thread_id = 0; 42 sigemptyset(&_caller_sigmask); 43 44 _vm_created_thread = false; 45 } 46 47 void OSThread::pd_destroy() { 48 } 49 50 // copied from synchronizer.cpp 51 52 void OSThread::handle_spinlock_contention(int tries) { 53 if (NoYieldsInMicrolock) return; 54 55 if (tries > 10) { 56 os::yield_all(tries); // Yield to threads of any priority 57 } else if (tries > 5) { 58 os::yield(); // Yield to threads of same or higher priority 59 } 60 } 61 62 void OSThread::SR_handler(Thread* thread, ucontext_t* uc) { 63 os::Solaris::SR_handler(thread, uc); 64 } | 32 #include "runtime/vmThread.hpp" 33 34 #include <signal.h> 35 36 // *************************************************************** 37 // Platform dependent initialization and cleanup 38 // *************************************************************** 39 40 void OSThread::pd_initialize() { 41 _thread_id = 0; 42 sigemptyset(&_caller_sigmask); 43 44 _vm_created_thread = false; 45 } 46 47 void OSThread::pd_destroy() { 48 } 49 50 // copied from synchronizer.cpp 51 52 void OSThread::SR_handler(Thread* thread, ucontext_t* uc) { 53 os::Solaris::SR_handler(thread, uc); 54 } |