1#ifndef RUBY_THREAD_PTHREAD_H
2#define RUBY_THREAD_PTHREAD_H
13#ifdef HAVE_PTHREAD_NP_H
14#include <pthread_np.h>
17#define RB_NATIVETHREAD_LOCK_INIT PTHREAD_MUTEX_INITIALIZER
18#define RB_NATIVETHREAD_COND_INIT PTHREAD_COND_INITIALIZER
25#if defined(__GLIBC__) || defined(__FreeBSD__)
48 rb_nativethread_lock_t
lock;
73#if __STDC_VERSION__ >= 201112
74 #define RB_THREAD_LOCAL_SPECIFIER _Thread_local
75#elif defined(__GNUC__)
77 #define RB_THREAD_LOCAL_SPECIFIER __thread
85 void *
ptr = pthread_getspecific(
key);
87 rb_bug(
"pthread_getspecific returns NULL");
96 rb_bug(
"pthread_setspecific error");
101RUBY_SYMBOL_EXPORT_BEGIN
102#ifdef RB_THREAD_LOCAL_SPECIFIER
113RUBY_SYMBOL_EXPORT_END
void rb_bug(const char *fmt,...)
struct native_thread_data_struct::@171 cond
rb_nativethread_cond_t intr
union native_thread_data_struct::@170 node
rb_nativethread_cond_t gvlq
rb_nativethread_cond_t switch_wait_cond
rb_nativethread_cond_t switch_cond
rb_nativethread_lock_t lock
const struct rb_thread_struct * owner
const struct rb_thread_struct * timer
RB_THREAD_LOCAL_SPECIFIER struct rb_execution_context_struct * ruby_current_ec
struct native_thread_data_struct native_thread_data_t
struct rb_global_vm_lock_struct rb_global_vm_lock_t
#define RB_THREAD_LOCAL_SPECIFIER
native_tls_key_t ruby_current_ec_key