mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8235678: Remove unnecessary calls to Thread::current() in MutexLocker calls
Add THREAD argument when available and make Thread* the first argument to relevant MutexLocker and MonitorLocker constructors Reviewed-by: lfoltan, coleenp, dholmes
This commit is contained in:
parent
e2240b714e
commit
7fc58a1020
36 changed files with 122 additions and 121 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -194,7 +194,7 @@ static void define_javabase_module(jobject module, jstring version,
|
|||
|
||||
bool duplicate_javabase = false;
|
||||
{
|
||||
MutexLocker m1(Module_lock, THREAD);
|
||||
MutexLocker m1(THREAD, Module_lock);
|
||||
|
||||
if (ModuleEntryTable::javabase_defined()) {
|
||||
duplicate_javabase = true;
|
||||
|
@ -379,7 +379,7 @@ void Modules::define_module(jobject module, jboolean is_open, jstring version,
|
|||
PackageEntryTable* package_table = NULL;
|
||||
PackageEntry* existing_pkg = NULL;
|
||||
{
|
||||
MutexLocker ml(Module_lock, THREAD);
|
||||
MutexLocker ml(THREAD, Module_lock);
|
||||
|
||||
if (num_packages > 0) {
|
||||
package_table = get_package_entry_table(h_loader);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue