src/hotspot/os/windows/os_windows.inline.hpp
changeset 53886 e94ed0236046
parent 53266 57d8566a2732
child 55524 b279ae9843b8
child 58678 9cf78a70fa4f
equal deleted inserted replaced
53885:e03bbe023e50 53886:e94ed0236046
    84 
    84 
    85 inline void os::exit(int num) {
    85 inline void os::exit(int num) {
    86   win32::exit_process_or_thread(win32::EPT_PROCESS, num);
    86   win32::exit_process_or_thread(win32::EPT_PROCESS, num);
    87 }
    87 }
    88 
    88 
       
    89 // Platform Monitor implementation
       
    90 
       
    91 inline os::PlatformMonitor::PlatformMonitor() {
       
    92   InitializeConditionVariable(&_cond);
       
    93   InitializeCriticalSection(&_mutex);
       
    94 }
       
    95 
       
    96 inline os::PlatformMonitor::~PlatformMonitor() {
       
    97   DeleteCriticalSection(&_mutex);
       
    98 }
       
    99 
       
   100 inline void os::PlatformMonitor::lock() {
       
   101   EnterCriticalSection(&_mutex);
       
   102 }
       
   103 
       
   104 inline void os::PlatformMonitor::unlock() {
       
   105   LeaveCriticalSection(&_mutex);
       
   106 }
       
   107 
       
   108 inline bool os::PlatformMonitor::try_lock() {
       
   109   return TryEnterCriticalSection(&_mutex);
       
   110 }
       
   111 
       
   112 inline void os::PlatformMonitor::notify() {
       
   113   WakeConditionVariable(&_cond);
       
   114 }
       
   115 
       
   116 inline void os::PlatformMonitor::notify_all() {
       
   117   WakeAllConditionVariable(&_cond);
       
   118 }
       
   119 
    89 #endif // OS_WINDOWS_OS_WINDOWS_INLINE_HPP
   120 #endif // OS_WINDOWS_OS_WINDOWS_INLINE_HPP