summaryrefslogtreecommitdiff
path: root/thread_pthread.h
diff options
context:
space:
mode:
authorKoichi Sasada <[email protected]>2023-03-31 03:52:58 +0900
committerKoichi Sasada <[email protected]>2023-03-31 11:28:18 +0900
commit2093e4c2db1e19991e601bf5191eddb4652de35d ()
tree486cb12704655596fdec0227a37450da23d8b5f4 /thread_pthread.h
parent83667008b925c32b3ab70fb6ec70f7398e960d1e (diff)
`nt->serial` for `RUBY_DEBUG_LOG`
Show native thread's serial on `RUBY_DEBUG_LOG`. `nt->serial` is also stored into `ruby_nt_serial` if the compiler supports `RB_THREAD_LOCAL_SPECIFIER`.
Notes: Merged: https://.com/ruby/ruby/pull/7630
-rw-r--r--thread_pthread.h20
1 files changed, 12 insertions, 8 deletions
@@ -26,7 +26,7 @@ struct rb_thread_sched_item {
};
struct rb_native_thread {
- int id;
rb_nativethread_id_t thread_id;
@@ -101,13 +101,17 @@ struct rb_thread_sched {
RUBY_SYMBOL_EXPORT_BEGIN
#ifdef RB_THREAD_LOCAL_SPECIFIER
-# ifdef __APPLE__
-// on Darwin, TLS can not be accessed across .so
-struct rb_execution_context_struct *rb_current_ec(void);
-void rb_current_ec_set(struct rb_execution_context_struct *);
-# else
-RUBY_EXTERN RB_THREAD_LOCAL_SPECIFIER struct rb_execution_context_struct *ruby_current_ec;
-# endif
#else
typedef pthread_key_t native_tls_key_t;