< prev index next >

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

Print this page

 16  * You should have received a copy of the GNU General Public License version
 17  * 2 along with this work; if not, write to the Free Software Foundation,
 18  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 19  *
 20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 21  * or visit www.oracle.com if you need additional information or have any
 22  * questions.
 23  *
 24  */
 25 
 26 #ifndef SHARE_RUNTIME_JAVATHREAD_INLINE_HPP
 27 #define SHARE_RUNTIME_JAVATHREAD_INLINE_HPP
 28 
 29 #include "runtime/javaThread.hpp"
 30 
 31 #include "classfile/javaClasses.hpp"
 32 #include "gc/shared/tlab_globals.hpp"
 33 #include "memory/universe.hpp"
 34 #include "oops/instanceKlass.hpp"
 35 #include "oops/oopHandle.inline.hpp"

 36 #include "runtime/atomic.hpp"
 37 #include "runtime/continuation.hpp"
 38 #include "runtime/continuationEntry.inline.hpp"
 39 #include "runtime/nonJavaThread.hpp"
 40 #include "runtime/orderAccess.hpp"
 41 #include "runtime/safepoint.hpp"
 42 
 43 inline void JavaThread::set_suspend_flag(SuspendFlags f) {
 44   uint32_t flags;
 45   do {
 46     flags = _suspend_flags;
 47   }
 48   while (Atomic::cmpxchg(&_suspend_flags, flags, (flags | f)) != flags);
 49 }
 50 inline void JavaThread::clear_suspend_flag(SuspendFlags f) {
 51   uint32_t flags;
 52   do {
 53     flags = _suspend_flags;
 54   }
 55   while (Atomic::cmpxchg(&_suspend_flags, flags, (flags & ~f)) != flags);

 16  * You should have received a copy of the GNU General Public License version
 17  * 2 along with this work; if not, write to the Free Software Foundation,
 18  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 19  *
 20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 21  * or visit www.oracle.com if you need additional information or have any
 22  * questions.
 23  *
 24  */
 25 
 26 #ifndef SHARE_RUNTIME_JAVATHREAD_INLINE_HPP
 27 #define SHARE_RUNTIME_JAVATHREAD_INLINE_HPP
 28 
 29 #include "runtime/javaThread.hpp"
 30 
 31 #include "classfile/javaClasses.hpp"
 32 #include "gc/shared/tlab_globals.hpp"
 33 #include "memory/universe.hpp"
 34 #include "oops/instanceKlass.hpp"
 35 #include "oops/oopHandle.inline.hpp"
 36 #include "prims/jvmtiThreadState.hpp"
 37 #include "runtime/atomic.hpp"
 38 #include "runtime/continuation.hpp"
 39 #include "runtime/continuationEntry.inline.hpp"
 40 #include "runtime/nonJavaThread.hpp"
 41 #include "runtime/orderAccess.hpp"
 42 #include "runtime/safepoint.hpp"
 43 
 44 inline void JavaThread::set_suspend_flag(SuspendFlags f) {
 45   uint32_t flags;
 46   do {
 47     flags = _suspend_flags;
 48   }
 49   while (Atomic::cmpxchg(&_suspend_flags, flags, (flags | f)) != flags);
 50 }
 51 inline void JavaThread::clear_suspend_flag(SuspendFlags f) {
 52   uint32_t flags;
 53   do {
 54     flags = _suspend_flags;
 55   }
 56   while (Atomic::cmpxchg(&_suspend_flags, flags, (flags & ~f)) != flags);
< prev index next >