Mercurial > hg > graal-compiler
comparison src/share/vm/runtime/mutex.cpp @ 1930:2d26b0046e0d
Merge.
author | Thomas Wuerthinger <wuerthinger@ssw.jku.at> |
---|---|
date | Tue, 30 Nov 2010 14:53:30 +0100 |
parents | c18cbe5936b8 |
children | f95d63e2154a |
comparison
equal
deleted
inserted
replaced
1484:6b7001391c97 | 1930:2d26b0046e0d |
---|---|
1 | 1 |
2 /* | 2 /* |
3 * Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved. | 3 * Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved. |
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 * | 5 * |
6 * This code is free software; you can redistribute it and/or modify it | 6 * This code is free software; you can redistribute it and/or modify it |
7 * under the terms of the GNU General Public License version 2 only, as | 7 * under the terms of the GNU General Public License version 2 only, as |
8 * published by the Free Software Foundation. | 8 * published by the Free Software Foundation. |
15 * | 15 * |
16 * You should have received a copy of the GNU General Public License version | 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, | 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. | 18 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
19 * | 19 * |
20 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, | 20 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
21 * CA 95054 USA or visit www.sun.com if you need additional information or | 21 * or visit www.oracle.com if you need additional information or have any |
22 * have any questions. | 22 * questions. |
23 * | 23 * |
24 */ | 24 */ |
25 | 25 |
26 # include "incls/_precompiled.incl" | 26 # include "incls/_precompiled.incl" |
27 # include "incls/_mutex.cpp.incl" | 27 # include "incls/_mutex.cpp.incl" |
1286 !SafepointSynchronize::is_at_safepoint() && | 1286 !SafepointSynchronize::is_at_safepoint() && |
1287 this != Interrupt_lock && this != ProfileVM_lock && | 1287 this != Interrupt_lock && this != ProfileVM_lock && |
1288 !(this == Safepoint_lock && contains(locks, Terminator_lock) && | 1288 !(this == Safepoint_lock && contains(locks, Terminator_lock) && |
1289 SafepointSynchronize::is_synchronizing())) { | 1289 SafepointSynchronize::is_synchronizing())) { |
1290 new_owner->print_owned_locks(); | 1290 new_owner->print_owned_locks(); |
1291 fatal4("acquiring lock %s/%d out of order with lock %s/%d -- possible deadlock", | 1291 fatal(err_msg("acquiring lock %s/%d out of order with lock %s/%d -- " |
1292 this->name(), this->rank(), locks->name(), locks->rank()); | 1292 "possible deadlock", this->name(), this->rank(), |
1293 locks->name(), locks->rank())); | |
1293 } | 1294 } |
1294 | 1295 |
1295 this->_next = new_owner->_owned_locks; | 1296 this->_next = new_owner->_owned_locks; |
1296 new_owner->_owned_locks = this; | 1297 new_owner->_owned_locks = this; |
1297 #endif | 1298 #endif |
1340 void Monitor::check_prelock_state(Thread *thread) { | 1341 void Monitor::check_prelock_state(Thread *thread) { |
1341 assert((!thread->is_Java_thread() || ((JavaThread *)thread)->thread_state() == _thread_in_vm) | 1342 assert((!thread->is_Java_thread() || ((JavaThread *)thread)->thread_state() == _thread_in_vm) |
1342 || rank() == Mutex::special, "wrong thread state for using locks"); | 1343 || rank() == Mutex::special, "wrong thread state for using locks"); |
1343 if (StrictSafepointChecks) { | 1344 if (StrictSafepointChecks) { |
1344 if (thread->is_VM_thread() && !allow_vm_block()) { | 1345 if (thread->is_VM_thread() && !allow_vm_block()) { |
1345 fatal1("VM thread using lock %s (not allowed to block on)", name()); | 1346 fatal(err_msg("VM thread using lock %s (not allowed to block on)", |
1347 name())); | |
1346 } | 1348 } |
1347 debug_only(if (rank() != Mutex::special) \ | 1349 debug_only(if (rank() != Mutex::special) \ |
1348 thread->check_for_valid_safepoint_state(false);) | 1350 thread->check_for_valid_safepoint_state(false);) |
1349 } | 1351 } |
1350 } | 1352 } |