< prev index next >

src/hotspot/share/runtime/thread.inline.hpp

Print this page

105   uint32_t flags;
106   do {
107     flags = _suspend_flags;
108   }
109   while (Atomic::cmpxchg(&_suspend_flags, flags, (flags & ~f)) != flags);
110 }
111 
112 inline void JavaThread::set_trace_flag() {
113   set_suspend_flag(_trace_flag);
114 }
115 inline void JavaThread::clear_trace_flag() {
116   clear_suspend_flag(_trace_flag);
117 }
118 inline void JavaThread::set_obj_deopt_flag() {
119   set_suspend_flag(_obj_deopt);
120 }
121 inline void JavaThread::clear_obj_deopt_flag() {
122   clear_suspend_flag(_obj_deopt);
123 }
124 







125 inline bool JavaThread::clear_async_exception_condition() {
126   bool ret = has_async_exception_condition();
127   clear_suspend_flag(_has_async_exception);
128   return ret;
129 }
130 
131 inline void JavaThread::set_pending_async_exception(oop e) {
132   _pending_async_exception = e;
133   set_suspend_flag(_has_async_exception);
134 }
135 
136 inline void JavaThread::set_pending_unsafe_access_error() {
137   set_suspend_flag(_has_async_exception);
138   DEBUG_ONLY(_is_unsafe_access_error = true);
139 }
140 
141 inline JavaThreadState JavaThread::thread_state() const    {
142 #if defined(PPC64) || defined (AARCH64)
143   // Use membars when accessing volatile _thread_state. See
144   // Threads::create_vm() for size checks.

105   uint32_t flags;
106   do {
107     flags = _suspend_flags;
108   }
109   while (Atomic::cmpxchg(&_suspend_flags, flags, (flags & ~f)) != flags);
110 }
111 
112 inline void JavaThread::set_trace_flag() {
113   set_suspend_flag(_trace_flag);
114 }
115 inline void JavaThread::clear_trace_flag() {
116   clear_suspend_flag(_trace_flag);
117 }
118 inline void JavaThread::set_obj_deopt_flag() {
119   set_suspend_flag(_obj_deopt);
120 }
121 inline void JavaThread::clear_obj_deopt_flag() {
122   clear_suspend_flag(_obj_deopt);
123 }
124 
125 inline void JavaThread::set_thread_suspended() {
126   set_suspend_flag(_thread_suspended);
127 }
128 inline void JavaThread::clear_thread_suspended() {
129   clear_suspend_flag(_thread_suspended);
130 }
131 
132 inline bool JavaThread::clear_async_exception_condition() {
133   bool ret = has_async_exception_condition();
134   clear_suspend_flag(_has_async_exception);
135   return ret;
136 }
137 
138 inline void JavaThread::set_pending_async_exception(oop e) {
139   _pending_async_exception = e;
140   set_suspend_flag(_has_async_exception);
141 }
142 
143 inline void JavaThread::set_pending_unsafe_access_error() {
144   set_suspend_flag(_has_async_exception);
145   DEBUG_ONLY(_is_unsafe_access_error = true);
146 }
147 
148 inline JavaThreadState JavaThread::thread_state() const    {
149 #if defined(PPC64) || defined (AARCH64)
150   // Use membars when accessing volatile _thread_state. See
151   // Threads::create_vm() for size checks.
< prev index next >