mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 09:34:38 +02:00
8252685: APIs that require JavaThread should take JavaThread arguments
Reviewed-by: coleenp, sspitsyn, kvn, iklam
This commit is contained in:
parent
2066f497b9
commit
02f895c5f6
120 changed files with 507 additions and 521 deletions
|
@ -472,17 +472,17 @@ Symbol* SymbolTable::do_add_if_needed(const char* name, int len, uintx hash, boo
|
|||
bool clean_hint = false;
|
||||
bool rehash_warning = false;
|
||||
Symbol* sym = NULL;
|
||||
Thread* THREAD = Thread::current();
|
||||
Thread* current = Thread::current();
|
||||
|
||||
do {
|
||||
// Callers have looked up the symbol once, insert the symbol.
|
||||
sym = allocate_symbol(name, len, heap);
|
||||
if (_local_table->insert(THREAD, lookup, sym, &rehash_warning, &clean_hint)) {
|
||||
if (_local_table->insert(current, lookup, sym, &rehash_warning, &clean_hint)) {
|
||||
break;
|
||||
}
|
||||
// In case another thread did a concurrent add, return value already in the table.
|
||||
// This could fail if the symbol got deleted concurrently, so loop back until success.
|
||||
if (_local_table->get(THREAD, lookup, stg, &rehash_warning)) {
|
||||
if (_local_table->get(current, lookup, stg, &rehash_warning)) {
|
||||
sym = stg.get_res_sym();
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue