summaryrefslogtreecommitdiff
path: root/thread_pthread.h
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-07-08 01:47:06 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2023-07-08 11:31:17 +0900
commit3c4d788bfe7ea2fe2e9b6c0246237be45a41a12e (patch)
tree0338cebf51540e39510af936a00c7884c62dfa35 /thread_pthread.h
parentf052aa11f218bfd97b1423e3157aa65261ee3f27 (diff)
macos: symbols for `rb_execution_context_t` should be internal
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/8040
Diffstat (limited to 'thread_pthread.h')
-rw-r--r--thread_pthread.h24
1 files changed, 11 insertions, 13 deletions
diff --git a/thread_pthread.h b/thread_pthread.h
index bf97c7a0ee..10d3fcd928 100644
--- a/thread_pthread.h
+++ b/thread_pthread.h
@@ -90,19 +90,18 @@ struct rb_thread_sched {
int wait_yield;
};
-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;
-
- // for RUBY_DEBUG_LOG()
- RUBY_EXTERN RB_THREAD_LOCAL_SPECIFIER rb_atomic_t ruby_nt_serial;
- #define RUBY_NT_SERIAL 1
- # endif
+# 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;
+
+// for RUBY_DEBUG_LOG()
+RUBY_EXTERN RB_THREAD_LOCAL_SPECIFIER rb_atomic_t ruby_nt_serial;
+#define RUBY_NT_SERIAL 1
+# endif
#else
typedef pthread_key_t native_tls_key_t;
@@ -123,6 +122,5 @@ native_tls_set(native_tls_key_t key, void *ptr)
RUBY_EXTERN native_tls_key_t ruby_current_ec_key;
#endif
-RUBY_SYMBOL_EXPORT_END
#endif /* RUBY_THREAD_PTHREAD_H */