Thu, 24 Mar 2011 23:06:13 -0700
Merge
src/share/vm/runtime/vmStructs.cpp | file | annotate | diff | comparison | revisions |
1.1 --- a/src/os/windows/vm/os_windows.cpp Thu Mar 24 23:04:36 2011 -0700 1.2 +++ b/src/os/windows/vm/os_windows.cpp Thu Mar 24 23:06:13 2011 -0700 1.3 @@ -3297,9 +3297,14 @@ 1.4 "possibility of dangling Thread pointer"); 1.5 1.6 OSThread* osthread = thread->osthread(); 1.7 - bool interrupted; 1.8 - interrupted = osthread->interrupted(); 1.9 - if (clear_interrupted == true) { 1.10 + bool interrupted = osthread->interrupted(); 1.11 + // There is no synchronization between the setting of the interrupt 1.12 + // and it being cleared here. It is critical - see 6535709 - that 1.13 + // we only clear the interrupt state, and reset the interrupt event, 1.14 + // if we are going to report that we were indeed interrupted - else 1.15 + // an interrupt can be "lost", leading to spurious wakeups or lost wakeups 1.16 + // depending on the timing 1.17 + if (interrupted && clear_interrupted) { 1.18 osthread->set_interrupted(false); 1.19 ResetEvent(osthread->interrupt_event()); 1.20 } // Otherwise leave the interrupted state alone
2.1 --- a/src/share/vm/runtime/os.cpp Thu Mar 24 23:04:36 2011 -0700 2.2 +++ b/src/share/vm/runtime/os.cpp Thu Mar 24 23:06:13 2011 -0700 2.3 @@ -1079,11 +1079,6 @@ 2.4 "%/lib/jsse.jar:" 2.5 "%/lib/jce.jar:" 2.6 "%/lib/charsets.jar:" 2.7 - 2.8 - // ## TEMPORARY hack to keep the legacy launcher working when 2.9 - // ## only the boot module is installed (cf. j.l.ClassLoader) 2.10 - "%/lib/modules/jdk.boot.jar:" 2.11 - 2.12 "%/classes"; 2.13 char* sysclasspath = format_boot_path(classpath_format, home, home_len, fileSep, pathSep); 2.14 if (sysclasspath == NULL) return false;
3.1 --- a/src/share/vm/runtime/osThread.hpp Thu Mar 24 23:04:36 2011 -0700 3.2 +++ b/src/share/vm/runtime/osThread.hpp Thu Mar 24 23:06:13 2011 -0700 3.3 @@ -1,5 +1,5 @@ 3.4 /* 3.5 - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 3.6 + * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. 3.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3.8 * 3.9 * This code is free software; you can redistribute it and/or modify it 3.10 @@ -65,7 +65,7 @@ 3.11 OSThreadStartFunc _start_proc; // Thread start routine 3.12 void* _start_parm; // Thread start routine parameter 3.13 volatile ThreadState _state; // Thread state *hint* 3.14 - jint _interrupted; // Thread.isInterrupted state 3.15 + volatile jint _interrupted; // Thread.isInterrupted state 3.16 3.17 // Note: _interrupted must be jint, so that Java intrinsics can access it. 3.18 // The value stored there must be either 0 or 1. It must be possible 3.19 @@ -89,7 +89,7 @@ 3.20 void* start_parm() const { return _start_parm; } 3.21 void set_start_parm(void* start_parm) { _start_parm = start_parm; } 3.22 3.23 - bool interrupted() const { return _interrupted != 0; } 3.24 + volatile bool interrupted() const { return _interrupted != 0; } 3.25 void set_interrupted(bool z) { _interrupted = z ? 1 : 0; } 3.26 3.27 // Printing
4.1 --- a/src/share/vm/runtime/vmStructs.cpp Thu Mar 24 23:04:36 2011 -0700 4.2 +++ b/src/share/vm/runtime/vmStructs.cpp Thu Mar 24 23:06:13 2011 -0700 4.3 @@ -840,7 +840,7 @@ 4.4 /* OSThread */ \ 4.5 /************/ \ 4.6 \ 4.7 - nonstatic_field(OSThread, _interrupted, jint) \ 4.8 + volatile_nonstatic_field(OSThread, _interrupted, jint) \ 4.9 \ 4.10 /************************/ \ 4.11 /* OopMap and OopMapSet */ \