summaryrefslogtreecommitdiff
path: root/include/ruby/thread_native.h
diff options
context:
space:
mode:
-rw-r--r--include/ruby/thread_native.h17
1 files changed, 17 insertions, 0 deletions
@@ -31,10 +31,14 @@ typedef union rb_thread_lock_union {
CRITICAL_SECTION crit;
} rb_nativethread_lock_t;
#elif defined(HAVE_PTHREAD_H)
#include <pthread.h>
typedef pthread_t rb_nativethread_id_t;
typedef pthread_mutex_t rb_nativethread_lock_t;
#else
#error "unsupported thread type"
@@ -50,6 +54,19 @@ void rb_nativethread_lock_destroy(rb_nativethread_lock_t *lock);
void rb_nativethread_lock_lock(rb_nativethread_lock_t *lock);
void rb_nativethread_lock_unlock(rb_nativethread_lock_t *lock);
RUBY_SYMBOL_EXPORT_END
#endif