Mercurial > hg > graal-jvmci-8
diff src/os/linux/vm/osThread_linux.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 | f2110083203d |
line wrap: on
line diff
--- a/src/os/linux/vm/osThread_linux.hpp Fri May 18 09:15:15 2012 -0700 +++ b/src/os/linux/vm/osThread_linux.hpp Tue May 22 10:11:53 2012 +0200 @@ -24,6 +24,8 @@ #ifndef OS_LINUX_VM_OSTHREAD_LINUX_HPP #define OS_LINUX_VM_OSTHREAD_LINUX_HPP + public: + typedef pid_t thread_id_t; private: int _thread_type; @@ -37,13 +39,6 @@ _thread_type = type; } - private: - - // _thread_id is kernel thread id (similar to LWP id on Solaris). Each - // thread has a unique thread_id (LinuxThreads or NPTL). It can be used - // to access /proc. - pid_t _thread_id; - // _pthread_id is the pthread id, which is used by library calls // (e.g. pthread_kill). pthread_t _pthread_id; @@ -56,11 +51,6 @@ sigset_t caller_sigmask() const { return _caller_sigmask; } void set_caller_sigmask(sigset_t sigmask) { _caller_sigmask = sigmask; } - static size_t thread_id_size() { return sizeof(pid_t); } - - pid_t 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; } @@ -72,9 +62,6 @@ return false; } #endif // ASSERT - void set_thread_id(pid_t id) { - _thread_id = id; - } pthread_t pthread_id() const { return _pthread_id; }