comparison src/os/bsd/vm/osThread_bsd.hpp @ 8023:758935f7c23f

8006423: SA: NullPointerException in sun.jvm.hotspot.debugger.bsd.BsdThread.getContext(BsdThread.java:67) Summary: Do not rely on mach thread port names to identify threads from SA Reviewed-by: dholmes, minqi, rbackman
author sla
date Fri, 08 Feb 2013 12:48:24 +0100
parents 0af5da0c9d9d
children f2110083203d
comparison
equal deleted inserted replaced
8021:8d9fc28831cc 8023:758935f7c23f
47 47
48 // _pthread_id is the pthread id, which is used by library calls 48 // _pthread_id is the pthread id, which is used by library calls
49 // (e.g. pthread_kill). 49 // (e.g. pthread_kill).
50 pthread_t _pthread_id; 50 pthread_t _pthread_id;
51 51
52 // This is the "thread_id" from struct thread_identifier_info. According to a
53 // comment in thread_info.h, this is a "system-wide unique 64-bit thread id".
54 // The value is used by SA to correlate threads.
55 uint64_t _unique_thread_id;
56
52 sigset_t _caller_sigmask; // Caller's signal mask 57 sigset_t _caller_sigmask; // Caller's signal mask
53 58
54 public: 59 public:
55 60
56 // Methods to save/restore caller's signal mask 61 // Methods to save/restore caller's signal mask
73 pthread_t pthread_id() const { 78 pthread_t pthread_id() const {
74 return _pthread_id; 79 return _pthread_id;
75 } 80 }
76 void set_pthread_id(pthread_t tid) { 81 void set_pthread_id(pthread_t tid) {
77 _pthread_id = tid; 82 _pthread_id = tid;
83 }
84
85 void set_unique_thread_id(uint64_t id) {
86 _unique_thread_id = id;
78 } 87 }
79 88
80 // *************************************************************** 89 // ***************************************************************
81 // suspension support. 90 // suspension support.
82 // *************************************************************** 91 // ***************************************************************