< prev index next >

src/hotspot/os/windows/os_windows.cpp

Print this page

        

*** 24,50 **** // Must be at least Windows Vista or Server 2008 to use InitOnceExecuteOnce #define _WIN32_WINNT 0x0600 // no precompiled headers #include "classfile/classLoader.hpp" #include "classfile/systemDictionary.hpp" #include "classfile/vmSymbols.hpp" #include "code/icBuffer.hpp" #include "code/vtableStubs.hpp" #include "compiler/compileBroker.hpp" #include "compiler/disassembler.hpp" #include "interpreter/interpreter.hpp" - #include "jvm_windows.h" #include "logging/log.hpp" #include "memory/allocation.inline.hpp" #include "memory/filemap.hpp" #include "oops/oop.inline.hpp" #include "os_share_windows.hpp" #include "os_windows.inline.hpp" #include "prims/jniFastGetField.hpp" - #include "prims/jvm.h" #include "prims/jvm_misc.hpp" #include "runtime/arguments.hpp" #include "runtime/atomic.hpp" #include "runtime/extendedPC.hpp" #include "runtime/globals.hpp" --- 24,49 ---- // Must be at least Windows Vista or Server 2008 to use InitOnceExecuteOnce #define _WIN32_WINNT 0x0600 // no precompiled headers + #include "jvm.h" #include "classfile/classLoader.hpp" #include "classfile/systemDictionary.hpp" #include "classfile/vmSymbols.hpp" #include "code/icBuffer.hpp" #include "code/vtableStubs.hpp" #include "compiler/compileBroker.hpp" #include "compiler/disassembler.hpp" #include "interpreter/interpreter.hpp" #include "logging/log.hpp" #include "memory/allocation.inline.hpp" #include "memory/filemap.hpp" #include "oops/oop.inline.hpp" #include "os_share_windows.hpp" #include "os_windows.inline.hpp" #include "prims/jniFastGetField.hpp" #include "prims/jvm_misc.hpp" #include "runtime/arguments.hpp" #include "runtime/atomic.hpp" #include "runtime/extendedPC.hpp" #include "runtime/globals.hpp"
*** 98,107 **** --- 97,107 ---- #include <io.h> #include <process.h> // For _beginthreadex(), _endthreadex() #include <imagehlp.h> // For os::dll_address_to_function_name // for enumerating dll libraries #include <vdmdbg.h> + #include <psapi.h> // for timer info max values which include all bits #define ALL_64_BITS CONST64(-1) // For DLL loading/load error detection
*** 3654,3664 **** static HANDLE handles[MAXIMUM_THREADS_TO_KEEP]; static int handle_count = 0; static INIT_ONCE init_once_crit_sect = INIT_ONCE_STATIC_INIT; static CRITICAL_SECTION crit_sect; ! static volatile jint process_exiting = 0; int i, j; DWORD res; HANDLE hproc, hthr; // We only attempt to register threads until a process exiting --- 3654,3664 ---- static HANDLE handles[MAXIMUM_THREADS_TO_KEEP]; static int handle_count = 0; static INIT_ONCE init_once_crit_sect = INIT_ONCE_STATIC_INIT; static CRITICAL_SECTION crit_sect; ! static volatile int process_exiting = 0; int i, j; DWORD res; HANDLE hproc, hthr; // We only attempt to register threads until a process exiting
*** 3673,3683 **** warning("crit_sect initialization failed in %s: %d\n", __FILE__, __LINE__); } else if (OrderAccess::load_acquire(&process_exiting) == 0) { if (what != EPT_THREAD) { // Atomically set process_exiting before the critical section // to increase the visibility between racing threads. ! Atomic::cmpxchg((jint)GetCurrentThreadId(), &process_exiting, 0); } EnterCriticalSection(&crit_sect); if (what == EPT_THREAD && OrderAccess::load_acquire(&process_exiting) == 0) { // Remove from the array those handles of the threads that have completed exiting. --- 3673,3683 ---- warning("crit_sect initialization failed in %s: %d\n", __FILE__, __LINE__); } else if (OrderAccess::load_acquire(&process_exiting) == 0) { if (what != EPT_THREAD) { // Atomically set process_exiting before the critical section // to increase the visibility between racing threads. ! Atomic::cmpxchg((int)GetCurrentThreadId(), &process_exiting, 0); } EnterCriticalSection(&crit_sect); if (what == EPT_THREAD && OrderAccess::load_acquire(&process_exiting) == 0) { // Remove from the array those handles of the threads that have completed exiting.
< prev index next >