aboutsummaryrefslogtreecommitdiffstats
path: root/thread_pthread.h
diff options
context:
space:
mode:
Diffstat (limited to 'thread_pthread.h')
-rw-r--r--thread_pthread.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/thread_pthread.h b/thread_pthread.h
index 94658d4e0c..3742cb2848 100644
--- a/thread_pthread.h
+++ b/thread_pthread.h
@@ -22,6 +22,18 @@ typedef pthread_cond_t rb_thread_cond_t;
typedef struct native_thread_data_struct {
void *signal_thread_list;
pthread_cond_t sleep_cond;
+ pthread_cond_t gvl_cond;
+ struct rb_thread_struct *gvl_next;
} native_thread_data_t;
+#include <semaphore.h>
+
+typedef struct rb_global_vm_lock_struct {
+ pthread_mutex_t lock;
+ struct rb_thread_struct * volatile waiting_threads;
+ struct rb_thread_struct *waiting_last_thread;
+ int waiting;
+ int volatile acquired;
+} rb_global_vm_lock_t;
+
#endif /* RUBY_THREAD_PTHREAD_H */