45 typedef pid_t thread_id_t;
46 #endif
47
48 // _pthread_id is the pthread id, which is used by library calls
49 // (e.g. pthread_kill).
50 pthread_t _pthread_id;
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
57 sigset_t _caller_sigmask; // Caller's signal mask
58
59 public:
60
61 // Methods to save/restore caller's signal mask
62 sigset_t caller_sigmask() const { return _caller_sigmask; }
63 void set_caller_sigmask(sigset_t sigmask) { _caller_sigmask = sigmask; }
64
65 #ifndef PRODUCT
66 // Used for debugging, return a unique integer for each thread.
67 intptr_t thread_identifier() const { return (intptr_t)_pthread_id; }
68 #endif
69
70 #ifdef ASSERT
71 // We expect no reposition failures so kill vm if we get one.
72 //
73 bool valid_reposition_failure() {
74 return false;
75 }
76 #endif // ASSERT
77
78 pthread_t pthread_id() const {
79 return _pthread_id;
80 }
81 void set_pthread_id(pthread_t tid) {
82 _pthread_id = tid;
83 }
84
85 void set_unique_thread_id(uint64_t id) {
86 _unique_thread_id = id;
87 }
88
|
45 typedef pid_t thread_id_t;
46 #endif
47
48 // _pthread_id is the pthread id, which is used by library calls
49 // (e.g. pthread_kill).
50 pthread_t _pthread_id;
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
57 sigset_t _caller_sigmask; // Caller's signal mask
58
59 public:
60
61 // Methods to save/restore caller's signal mask
62 sigset_t caller_sigmask() const { return _caller_sigmask; }
63 void set_caller_sigmask(sigset_t sigmask) { _caller_sigmask = sigmask; }
64
65 // unique integer for each thread
66 intptr_t thread_identifier() const { return (intptr_t)_pthread_id; }
67
68 #ifdef ASSERT
69 // We expect no reposition failures so kill vm if we get one.
70 //
71 bool valid_reposition_failure() {
72 return false;
73 }
74 #endif // ASSERT
75
76 pthread_t pthread_id() const {
77 return _pthread_id;
78 }
79 void set_pthread_id(pthread_t tid) {
80 _pthread_id = tid;
81 }
82
83 void set_unique_thread_id(uint64_t id) {
84 _unique_thread_id = id;
85 }
86
|