hotspot/src/share/vm/runtime/thread.cpp
changeset 6183 4c74cfe14f20
parent 5888 8eac4eb75d6e
child 6184 a017b5ba6782
equal deleted inserted replaced
6182:685deffe44a5 6183:4c74cfe14f20
   805 // However, there is a note in JavaThread::is_lock_owned() about the VM threads not being
   805 // However, there is a note in JavaThread::is_lock_owned() about the VM threads not being
   806 // used for compilation in the future. If that change is made, the need for these methods
   806 // used for compilation in the future. If that change is made, the need for these methods
   807 // should be revisited, and they should be removed if possible.
   807 // should be revisited, and they should be removed if possible.
   808 
   808 
   809 bool Thread::is_lock_owned(address adr) const {
   809 bool Thread::is_lock_owned(address adr) const {
   810   return (_stack_base >= adr && adr >= (_stack_base - _stack_size));
   810   return on_local_stack(adr);
   811 }
   811 }
   812 
   812 
   813 bool Thread::set_as_starting_thread() {
   813 bool Thread::set_as_starting_thread() {
   814  // NOTE: this must be called inside the main thread.
   814  // NOTE: this must be called inside the main thread.
   815   return os::create_main_thread((JavaThread*)this);
   815   return os::create_main_thread((JavaThread*)this);