src/share/vm/runtime/mutex.cpp

changeset 9931
fd44df5e3bc3
parent 7535
7ae4e26cb1e0
parent 9891
4904bded9702
equal deleted inserted replaced
9855:274a1ea904c8 9931:fd44df5e3bc3
1 1
2 /* 2 /*
3 * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. 3 * Copyright (c) 1998, 2017, 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.
1371 name())); 1371 name()));
1372 } 1372 }
1373 debug_only(if (rank() != Mutex::special) \ 1373 debug_only(if (rank() != Mutex::special) \
1374 thread->check_for_valid_safepoint_state(false);) 1374 thread->check_for_valid_safepoint_state(false);)
1375 } 1375 }
1376 if (thread->is_Watcher_thread()) { 1376 assert(!os::ThreadCrashProtection::is_crash_protected(thread),
1377 assert(!WatcherThread::watcher_thread()->has_crash_protection(), 1377 "locking not allowed when crash protection is set");
1378 "locking not allowed when crash protection is set");
1379 }
1380 } 1378 }
1381 1379
1382 void Monitor::check_block_state(Thread *thread) { 1380 void Monitor::check_block_state(Thread *thread) {
1383 if (!_allow_vm_block && thread->is_VM_thread()) { 1381 if (!_allow_vm_block && thread->is_VM_thread()) {
1384 warning("VM thread blocked on lock"); 1382 warning("VM thread blocked on lock");

mercurial