mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 19:14:38 +02:00
7129164: JNI Get/ReleasePrimitiveArrayCritical doesn't scale
Reviewed-by: kvn, iveresov, dholmes
This commit is contained in:
parent
e27deedf24
commit
5721fa222a
6 changed files with 182 additions and 81 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2012, 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
|
||||
|
@ -1310,6 +1310,7 @@ class JavaThread: public Thread {
|
|||
|
||||
// JNI critical regions. These can nest.
|
||||
bool in_critical() { return _jni_active_critical > 0; }
|
||||
bool in_last_critical() { return _jni_active_critical == 1; }
|
||||
void enter_critical() { assert(Thread::current() == this,
|
||||
"this must be current thread");
|
||||
_jni_active_critical++; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue