mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8234740: Harmonize parameter order in Atomic - cmpxchg
Reviewed-by: rehn, dholmes
This commit is contained in:
parent
3d426623bf
commit
0ad50c2b5c
144 changed files with 504 additions and 506 deletions
|
@ -1586,7 +1586,7 @@ class AttachDetach : public StackObj {
|
|||
jint res = main_vm.AttachCurrentThread((void**)&hotspotEnv, NULL);
|
||||
_attached = res == JNI_OK;
|
||||
static volatile int report_attach_error = 0;
|
||||
if (res != JNI_OK && report_attach_error == 0 && Atomic::cmpxchg(1, &report_attach_error, 0) == 0) {
|
||||
if (res != JNI_OK && report_attach_error == 0 && Atomic::cmpxchg(&report_attach_error, 0, 1) == 0) {
|
||||
// Only report an attach error once
|
||||
jio_printf("Warning: attaching current thread to VM failed with %d (future attach errors are suppressed)\n", res);
|
||||
}
|
||||
|
@ -1599,7 +1599,7 @@ class AttachDetach : public StackObj {
|
|||
extern struct JavaVM_ main_vm;
|
||||
jint res = main_vm.DetachCurrentThread();
|
||||
static volatile int report_detach_error = 0;
|
||||
if (res != JNI_OK && report_detach_error == 0 && Atomic::cmpxchg(1, &report_detach_error, 0) == 0) {
|
||||
if (res != JNI_OK && report_detach_error == 0 && Atomic::cmpxchg(&report_detach_error, 0, 1) == 0) {
|
||||
// Only report an attach error once
|
||||
jio_printf("Warning: detaching current thread from VM failed with %d (future attach errors are suppressed)\n", res);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue