1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/thread_none.h
Yuta Saito 420622b5a7 [wasm] add no thread variant for freestanding environment
This implementation does nothing around preemptive context switching
because there is no native thread.
2022-01-19 11:19:06 +09:00

17 lines
514 B
C

#ifndef RUBY_THREAD_NONE_H
#define RUBY_THREAD_NONE_H
#define RB_NATIVETHREAD_LOCK_INIT (void)(0)
#define RB_NATIVETHREAD_COND_INIT (void)(0)
// no-thread impl doesn't use TLS but define this to avoid using tls key
// based implementation in vm.c
#define RB_THREAD_LOCAL_SPECIFIER
typedef struct native_thread_data_struct {} native_thread_data_t;
typedef struct rb_global_vm_lock_struct {} rb_global_vm_lock_t;
RUBY_EXTERN struct rb_execution_context_struct *ruby_current_ec;
#endif /* RUBY_THREAD_NONE_H */