1 /* 2 * Copyright (c) 1998, 2009, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 # include "incls/_precompiled.incl" 26 # include "incls/_synchronizer.cpp.incl" 27 28 #if defined(__GNUC__) && !defined(IA64) 29 // Need to inhibit inlining for older versions of GCC to avoid build-time failures 30 #define ATTR __attribute__((noinline)) 31 #else 32 #define ATTR 33 #endif 34 35 // Native markword accessors for synchronization and hashCode(). 36 // 37 // The "core" versions of monitor enter and exit reside in this file. 38 // The interpreter and compilers contain specialized transliterated 39 // variants of the enter-exit fast-path operations. See i486.ad fast_lock(), 40 // for instance. If you make changes here, make sure to modify the 41 // interpreter, and both C1 and C2 fast-path inline locking code emission. 42 // 43 // TODO: merge the objectMonitor and synchronizer classes. 44 // 45 // ----------------------------------------------------------------------------- 46 | 1 /* 2 * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 #include "precompiled.hpp" 26 #include "classfile/vmSymbols.hpp" 27 #include "memory/resourceArea.hpp" 28 #include "oops/markOop.hpp" 29 #include "oops/oop.inline.hpp" 30 #include "runtime/biasedLocking.hpp" 31 #include "runtime/handles.inline.hpp" 32 #include "runtime/interfaceSupport.hpp" 33 #include "runtime/mutexLocker.hpp" 34 #include "runtime/objectMonitor.hpp" 35 #include "runtime/objectMonitor.inline.hpp" 36 #include "runtime/osThread.hpp" 37 #include "runtime/stubRoutines.hpp" 38 #include "runtime/synchronizer.hpp" 39 #include "services/threadService.hpp" 40 #include "utilities/dtrace.hpp" 41 #include "utilities/events.hpp" 42 #include "utilities/preserveException.hpp" 43 #ifdef TARGET_OS_FAMILY_linux 44 # include "os_linux.inline.hpp" 45 # include "thread_linux.inline.hpp" 46 #endif 47 #ifdef TARGET_OS_FAMILY_solaris 48 # include "os_solaris.inline.hpp" 49 # include "thread_solaris.inline.hpp" 50 #endif 51 #ifdef TARGET_OS_FAMILY_windows 52 # include "os_windows.inline.hpp" 53 # include "thread_windows.inline.hpp" 54 #endif 55 56 #if defined(__GNUC__) && !defined(IA64) 57 // Need to inhibit inlining for older versions of GCC to avoid build-time failures 58 #define ATTR __attribute__((noinline)) 59 #else 60 #define ATTR 61 #endif 62 63 // Native markword accessors for synchronization and hashCode(). 64 // 65 // The "core" versions of monitor enter and exit reside in this file. 66 // The interpreter and compilers contain specialized transliterated 67 // variants of the enter-exit fast-path operations. See i486.ad fast_lock(), 68 // for instance. If you make changes here, make sure to modify the 69 // interpreter, and both C1 and C2 fast-path inline locking code emission. 70 // 71 // TODO: merge the objectMonitor and synchronizer classes. 72 // 73 // ----------------------------------------------------------------------------- 74 |