1706 void java_lang_Thread::set_thread(oop java_thread, JavaThread* thread) { |
1706 void java_lang_Thread::set_thread(oop java_thread, JavaThread* thread) { |
1707 java_thread->address_field_put(_eetop_offset, (address)thread); |
1707 java_thread->address_field_put(_eetop_offset, (address)thread); |
1708 } |
1708 } |
1709 |
1709 |
1710 bool java_lang_Thread::interrupted(oop java_thread) { |
1710 bool java_lang_Thread::interrupted(oop java_thread) { |
|
1711 // Make sure the caller can safely access oops. |
|
1712 assert(Thread::current()->is_VM_thread() || |
|
1713 (JavaThread::current()->thread_state() != _thread_blocked && |
|
1714 JavaThread::current()->thread_state() != _thread_in_native), |
|
1715 "Unsafe access to oop"); |
1711 return java_thread->bool_field_volatile(_interrupted_offset); |
1716 return java_thread->bool_field_volatile(_interrupted_offset); |
1712 } |
1717 } |
1713 |
1718 |
1714 void java_lang_Thread::set_interrupted(oop java_thread, bool val) { |
1719 void java_lang_Thread::set_interrupted(oop java_thread, bool val) { |
|
1720 // Make sure the caller can safely access oops. |
|
1721 assert(Thread::current()->is_VM_thread() || |
|
1722 (JavaThread::current()->thread_state() != _thread_blocked && |
|
1723 JavaThread::current()->thread_state() != _thread_in_native), |
|
1724 "Unsafe access to oop"); |
1715 java_thread->bool_field_put_volatile(_interrupted_offset, val); |
1725 java_thread->bool_field_put_volatile(_interrupted_offset, val); |
1716 } |
1726 } |
1717 |
1727 |
1718 |
1728 |
1719 oop java_lang_Thread::name(oop java_thread) { |
1729 oop java_lang_Thread::name(oop java_thread) { |