diff src/os/windows/vm/osThread_windows.hpp @ 6093:960a442eae91

7161732: Improve handling of thread_id in OSThread Reviewed-by: dholmes, kamg
author rbackman
date Tue, 22 May 2012 10:11:53 +0200
parents 0105f367a14c
children
line wrap: on
line diff
--- a/src/os/windows/vm/osThread_windows.hpp	Fri May 18 09:15:15 2012 -0700
+++ b/src/os/windows/vm/osThread_windows.hpp	Tue May 22 10:11:53 2012 +0200
@@ -25,12 +25,13 @@
 #ifndef OS_WINDOWS_VM_OSTHREAD_WINDOWS_HPP
 #define OS_WINDOWS_VM_OSTHREAD_WINDOWS_HPP
 
-typedef void* HANDLE;
+  typedef void* HANDLE;
+ public:
+  typedef unsigned long thread_id_t;
 
  private:
   // Win32-specific thread information
   HANDLE _thread_handle;        // Win32 thread handle
-  unsigned long _thread_id;     // Win32 thread id
   HANDLE _interrupt_event;      // Event signalled on thread interrupt
   ThreadState _last_state;
 
@@ -42,9 +43,6 @@
   HANDLE interrupt_event() const                   { return _interrupt_event; }
   void set_interrupt_event(HANDLE interrupt_event) { _interrupt_event = interrupt_event; }
 
-
-  static size_t thread_id_size()                   { return sizeof(unsigned long); }
-  unsigned long thread_id() const                  { return _thread_id; }
 #ifndef PRODUCT
   // Used for debugging, return a unique integer for each thread.
   int thread_identifier() const                    { return _thread_id; }
@@ -56,8 +54,6 @@
     return false;
   }
 #endif // ASSERT
-  void set_thread_id(unsigned long thread_id)      { _thread_id = thread_id; }
-
   bool is_try_mutex_enter()                        { return false; }
 
   // This is a temporary fix for the thread states during