--- a/src/hotspot/os/windows/threadCritical_windows.cpp Mon Nov 25 12:32:40 2019 +0100
+++ b/src/hotspot/os/windows/threadCritical_windows.cpp Mon Nov 25 12:33:15 2019 +0100
@@ -56,7 +56,7 @@
if (lock_owner != current_thread) {
// Grab the lock before doing anything.
- while (Atomic::cmpxchg(0, &lock_count, -1) != -1) {
+ while (Atomic::cmpxchg(&lock_count, -1, 0) != -1) {
if (initialized) {
DWORD ret = WaitForSingleObject(lock_event, INFINITE);
assert(ret == WAIT_OBJECT_0, "unexpected return value from WaitForSingleObject");