mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 02:54:35 +02:00
8043630: Method os::yield_all() should be removed
Reviewed-by: dholmes, dsimms
This commit is contained in:
parent
d9a2dbc73b
commit
5507f2b476
9 changed files with 9 additions and 58 deletions
|
@ -3336,13 +3336,7 @@ static bool initializeDirectBufferSupport(JNIEnv* env, JavaThread* thread) {
|
|||
directBufferSupportInitializeEnded = 1;
|
||||
} else {
|
||||
while (!directBufferSupportInitializeEnded && !directBufferSupportInitializeFailed) {
|
||||
// Set state as yield_all can call os:sleep. On Solaris, yield_all calls
|
||||
// os::sleep which requires the VM state transition. On other platforms, it
|
||||
// is not necessary. The following call to change the VM state is purposely
|
||||
// put inside the loop to avoid potential deadlock when multiple threads
|
||||
// try to call this method. See 6791815 for more details.
|
||||
ThreadInVMfromNative tivn(thread);
|
||||
os::yield_all();
|
||||
os::yield();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue