Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/AnonR/anonr.TX.../opt/alt/ruby27/include/ruby
File: thread_native.h
/**********************************************************************
[0] Fix | Delete
[1] Fix | Delete
thread_native.h -
[2] Fix | Delete
[3] Fix | Delete
$Author: ko1 $
[4] Fix | Delete
created at: Wed May 14 19:37:31 2014
[5] Fix | Delete
[6] Fix | Delete
Copyright (C) 2014 Yukihiro Matsumoto
[7] Fix | Delete
[8] Fix | Delete
**********************************************************************/
[9] Fix | Delete
[10] Fix | Delete
#ifndef RUBY_THREAD_NATIVE_H
[11] Fix | Delete
#define RUBY_THREAD_NATIVE_H 1
[12] Fix | Delete
[13] Fix | Delete
/*
[14] Fix | Delete
* This file contains wrapper APIs for native thread primitives
[15] Fix | Delete
* which Ruby interpreter uses.
[16] Fix | Delete
*
[17] Fix | Delete
* Now, we only suppors pthread and Windows threads.
[18] Fix | Delete
*
[19] Fix | Delete
* If you want to use Ruby's Mutex and so on to synchronize Ruby Threads,
[20] Fix | Delete
* please use Mutex directly.
[21] Fix | Delete
*/
[22] Fix | Delete
[23] Fix | Delete
[24] Fix | Delete
#if defined(_WIN32)
[25] Fix | Delete
#include <windows.h>
[26] Fix | Delete
typedef HANDLE rb_nativethread_id_t;
[27] Fix | Delete
[28] Fix | Delete
typedef union rb_thread_lock_union {
[29] Fix | Delete
HANDLE mutex;
[30] Fix | Delete
CRITICAL_SECTION crit;
[31] Fix | Delete
} rb_nativethread_lock_t;
[32] Fix | Delete
[33] Fix | Delete
#elif defined(HAVE_PTHREAD_H)
[34] Fix | Delete
#include <pthread.h>
[35] Fix | Delete
typedef pthread_t rb_nativethread_id_t;
[36] Fix | Delete
typedef pthread_mutex_t rb_nativethread_lock_t;
[37] Fix | Delete
[38] Fix | Delete
#else
[39] Fix | Delete
#error "unsupported thread type"
[40] Fix | Delete
[41] Fix | Delete
#endif
[42] Fix | Delete
[43] Fix | Delete
RUBY_SYMBOL_EXPORT_BEGIN
[44] Fix | Delete
[45] Fix | Delete
rb_nativethread_id_t rb_nativethread_self();
[46] Fix | Delete
[47] Fix | Delete
void rb_nativethread_lock_initialize(rb_nativethread_lock_t *lock);
[48] Fix | Delete
void rb_nativethread_lock_destroy(rb_nativethread_lock_t *lock);
[49] Fix | Delete
void rb_nativethread_lock_lock(rb_nativethread_lock_t *lock);
[50] Fix | Delete
void rb_nativethread_lock_unlock(rb_nativethread_lock_t *lock);
[51] Fix | Delete
[52] Fix | Delete
RUBY_SYMBOL_EXPORT_END
[53] Fix | Delete
[54] Fix | Delete
#endif
[55] Fix | Delete
[56] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function