summaryrefslogtreecommitdiff
path: root/include/ruby/thread_native.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/ruby/thread_native.h')
-rw-r--r--include/ruby/thread_native.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/ruby/thread_native.h b/include/ruby/thread_native.h
index 2945ff1e4d..8217a67514 100644
--- a/include/ruby/thread_native.h
+++ b/include/ruby/thread_native.h
@@ -28,6 +28,11 @@ typedef union rb_thread_lock_union {
CRITICAL_SECTION crit;
} rb_nativethread_lock_t;
+struct rb_thread_cond_struct {
+ struct cond_event_entry *next;
+ struct cond_event_entry *prev;
+};
+
typedef struct rb_thread_cond_struct rb_nativethread_cond_t;
#elif defined(HAVE_PTHREAD_H)
@@ -37,6 +42,12 @@ typedef pthread_t rb_nativethread_id_t;
typedef pthread_mutex_t rb_nativethread_lock_t;
typedef pthread_cond_t rb_nativethread_cond_t;
+#elif defined(__wasi__) // no-thread platforms
+
+typedef struct rb_nativethread_id_t *rb_nativethread_id_t;
+typedef struct rb_nativethread_lock_t *rb_nativethread_lock_t;
+typedef struct rb_nativethread_cond_t *rb_nativethread_cond_t;
+
#elif defined(__DOXYGEN__)
/** Opaque type that holds an ID of a native thread. */