Mercurial > hg > graal-jvmci-8
changeset 2388:006b3750a4d4
Merge
author | jcoomes |
---|---|
date | Thu, 24 Mar 2011 23:06:13 -0700 |
parents | 0e3ed5a14f73 (current diff) fc416c2556ec (diff) |
children | c10b82a05d58 74e790c48cd4 f731b22cd52d c6580380076b |
files | src/share/vm/runtime/vmStructs.cpp |
diffstat | 4 files changed, 12 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/src/os/windows/vm/os_windows.cpp Thu Mar 24 23:04:36 2011 -0700 +++ b/src/os/windows/vm/os_windows.cpp Thu Mar 24 23:06:13 2011 -0700 @@ -3297,9 +3297,14 @@ "possibility of dangling Thread pointer"); OSThread* osthread = thread->osthread(); - bool interrupted; - interrupted = osthread->interrupted(); - if (clear_interrupted == true) { + bool interrupted = osthread->interrupted(); + // There is no synchronization between the setting of the interrupt + // and it being cleared here. It is critical - see 6535709 - that + // we only clear the interrupt state, and reset the interrupt event, + // if we are going to report that we were indeed interrupted - else + // an interrupt can be "lost", leading to spurious wakeups or lost wakeups + // depending on the timing + if (interrupted && clear_interrupted) { osthread->set_interrupted(false); ResetEvent(osthread->interrupt_event()); } // Otherwise leave the interrupted state alone
--- a/src/share/vm/runtime/os.cpp Thu Mar 24 23:04:36 2011 -0700 +++ b/src/share/vm/runtime/os.cpp Thu Mar 24 23:06:13 2011 -0700 @@ -1079,11 +1079,6 @@ "%/lib/jsse.jar:" "%/lib/jce.jar:" "%/lib/charsets.jar:" - - // ## TEMPORARY hack to keep the legacy launcher working when - // ## only the boot module is installed (cf. j.l.ClassLoader) - "%/lib/modules/jdk.boot.jar:" - "%/classes"; char* sysclasspath = format_boot_path(classpath_format, home, home_len, fileSep, pathSep); if (sysclasspath == NULL) return false;
--- a/src/share/vm/runtime/osThread.hpp Thu Mar 24 23:04:36 2011 -0700 +++ b/src/share/vm/runtime/osThread.hpp Thu Mar 24 23:06:13 2011 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -65,7 +65,7 @@ OSThreadStartFunc _start_proc; // Thread start routine void* _start_parm; // Thread start routine parameter volatile ThreadState _state; // Thread state *hint* - jint _interrupted; // Thread.isInterrupted state + volatile jint _interrupted; // Thread.isInterrupted state // Note: _interrupted must be jint, so that Java intrinsics can access it. // The value stored there must be either 0 or 1. It must be possible @@ -89,7 +89,7 @@ void* start_parm() const { return _start_parm; } void set_start_parm(void* start_parm) { _start_parm = start_parm; } - bool interrupted() const { return _interrupted != 0; } + volatile bool interrupted() const { return _interrupted != 0; } void set_interrupted(bool z) { _interrupted = z ? 1 : 0; } // Printing
--- a/src/share/vm/runtime/vmStructs.cpp Thu Mar 24 23:04:36 2011 -0700 +++ b/src/share/vm/runtime/vmStructs.cpp Thu Mar 24 23:06:13 2011 -0700 @@ -840,7 +840,7 @@ /* OSThread */ \ /************/ \ \ - nonstatic_field(OSThread, _interrupted, jint) \ + volatile_nonstatic_field(OSThread, _interrupted, jint) \ \ /************************/ \ /* OopMap and OopMapSet */ \