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.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/ruby/thread_native.h b/include/ruby/thread_native.h
index 2945ff1e4d..c23b15e133 100644
--- a/include/ruby/thread_native.h
+++ b/include/ruby/thread_native.h
@@ -37,6 +37,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. */