equal
deleted
inserted
replaced
25 |
25 |
26 #ifndef OS_AIX_VM_OSTHREAD_AIX_HPP |
26 #ifndef OS_AIX_VM_OSTHREAD_AIX_HPP |
27 #define OS_AIX_VM_OSTHREAD_AIX_HPP |
27 #define OS_AIX_VM_OSTHREAD_AIX_HPP |
28 |
28 |
29 public: |
29 public: |
30 typedef pid_t thread_id_t; |
30 typedef pthread_t thread_id_t; |
31 |
31 |
32 private: |
32 private: |
33 int _thread_type; |
33 int _thread_type; |
34 |
34 |
35 public: |
35 public: |
41 _thread_type = type; |
41 _thread_type = type; |
42 } |
42 } |
43 |
43 |
44 private: |
44 private: |
45 |
45 |
46 // _pthread_id is the pthread id, which is used by library calls |
46 // On AIX, we use the pthread id as OSThread::thread_id and keep the kernel thread id |
47 // (e.g. pthread_kill). |
47 // separately for diagnostic purposes. |
48 pthread_t _pthread_id; |
48 // |
|
49 // Note: this kernel thread id is saved at thread start. Depending on the |
|
50 // AIX scheduling mode, this may not be the current thread id (usually not |
|
51 // a problem though as we run with AIXTHREAD_SCOPE=S). |
|
52 tid_t _kernel_thread_id; |
49 |
53 |
50 sigset_t _caller_sigmask; // Caller's signal mask |
54 sigset_t _caller_sigmask; // Caller's signal mask |
51 |
55 |
52 public: |
56 public: |
53 |
57 |
64 // |
68 // |
65 bool valid_reposition_failure() { |
69 bool valid_reposition_failure() { |
66 return false; |
70 return false; |
67 } |
71 } |
68 #endif // ASSERT |
72 #endif // ASSERT |
|
73 tid_t kernel_thread_id() const { |
|
74 return _kernel_thread_id; |
|
75 } |
|
76 void set_kernel_thread_id(tid_t tid) { |
|
77 _kernel_thread_id = tid; |
|
78 } |
|
79 |
69 pthread_t pthread_id() const { |
80 pthread_t pthread_id() const { |
70 return _pthread_id; |
81 // Here: same as OSThread::thread_id() |
71 } |
82 return _thread_id; |
72 void set_pthread_id(pthread_t tid) { |
|
73 _pthread_id = tid; |
|
74 } |
83 } |
75 |
84 |
76 // *************************************************************** |
85 // *************************************************************** |
77 // suspension support. |
86 // suspension support. |
78 // *************************************************************** |
87 // *************************************************************** |