equal
deleted
inserted
replaced
2689 return false; |
2689 return false; |
2690 } |
2690 } |
2691 |
2691 |
2692 directBufferSupportInitializeEnded = 1; |
2692 directBufferSupportInitializeEnded = 1; |
2693 } else { |
2693 } else { |
2694 ThreadInVMfromNative tivn(thread); // set state as yield_all can call os:sleep |
|
2695 while (!directBufferSupportInitializeEnded && !directBufferSupportInitializeFailed) { |
2694 while (!directBufferSupportInitializeEnded && !directBufferSupportInitializeFailed) { |
|
2695 // Set state as yield_all can call os:sleep. On Solaris, yield_all calls |
|
2696 // os::sleep which requires the VM state transition. On other platforms, it |
|
2697 // is not necessary. The following call to change the VM state is purposely |
|
2698 // put inside the loop to avoid potential deadlock when multiple threads |
|
2699 // try to call this method. See 6791815 for more details. |
|
2700 ThreadInVMfromNative tivn(thread); |
2696 os::yield_all(); |
2701 os::yield_all(); |
2697 } |
2702 } |
2698 } |
2703 } |
2699 |
2704 |
2700 return !directBufferSupportInitializeFailed; |
2705 return !directBufferSupportInitializeFailed; |