aboutsummaryrefslogtreecommitdiffstats
path: root/thread_pthread.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-23 10:50:32 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-23 10:50:32 +0000
commit4d3feac974f7b854c809f32541a30fa1be817540 (patch)
treebfb03e40fd4f575b707d011f4c61a71127306c97 /thread_pthread.c
parentb2bcef7294d1a65363773cfc97ade6bd286ee63a (diff)
downloadruby-4d3feac974f7b854c809f32541a30fa1be817540.tar.gz
* thread_(pthread|win32).h: rename rb_thread_cond_t to
rb_nativethread_cond_t. * thread.c, thread_pthread.c, thread_win32.c, vm_core.h: catch up renaming. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread_pthread.c')
-rw-r--r--thread_pthread.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/thread_pthread.c b/thread_pthread.c
index 1b4ec10b98..b66273520a 100644
--- a/thread_pthread.c
+++ b/thread_pthread.c
@@ -39,11 +39,11 @@ static void native_mutex_unlock(pthread_mutex_t *lock);
static int native_mutex_trylock(pthread_mutex_t *lock);
static void native_mutex_initialize(pthread_mutex_t *lock);
static void native_mutex_destroy(pthread_mutex_t *lock);
-static void native_cond_signal(rb_thread_cond_t *cond);
-static void native_cond_broadcast(rb_thread_cond_t *cond);
-static void native_cond_wait(rb_thread_cond_t *cond, pthread_mutex_t *mutex);
-static void native_cond_initialize(rb_thread_cond_t *cond, int flags);
-static void native_cond_destroy(rb_thread_cond_t *cond);
+static void native_cond_signal(rb_nativethread_cond_t *cond);
+static void native_cond_broadcast(rb_nativethread_cond_t *cond);
+static void native_cond_wait(rb_nativethread_cond_t *cond, pthread_mutex_t *mutex);
+static void native_cond_initialize(rb_nativethread_cond_t *cond, int flags);
+static void native_cond_destroy(rb_nativethread_cond_t *cond);
static void rb_thread_wakeup_timer_thread_low(void);
static pthread_t timer_thread_id;
@@ -253,7 +253,7 @@ native_mutex_destroy(pthread_mutex_t *lock)
}
static void
-native_cond_initialize(rb_thread_cond_t *cond, int flags)
+native_cond_initialize(rb_nativethread_cond_t *cond, int flags)
{
#ifdef HAVE_PTHREAD_COND_INIT
int r;
@@ -284,7 +284,7 @@ native_cond_initialize(rb_thread_cond_t *cond, int flags)
}
static void
-native_cond_destroy(rb_thread_cond_t *cond)
+native_cond_destroy(rb_nativethread_cond_t *cond)
{
#ifdef HAVE_PTHREAD_COND_INIT
int r = pthread_cond_destroy(&cond->cond);
@@ -305,7 +305,7 @@ native_cond_destroy(rb_thread_cond_t *cond)
*/
static void
-native_cond_signal(rb_thread_cond_t *cond)
+native_cond_signal(rb_nativethread_cond_t *cond)
{
int r;
do {
@@ -317,7 +317,7 @@ native_cond_signal(rb_thread_cond_t *cond)
}
static void
-native_cond_broadcast(rb_thread_cond_t *cond)
+native_cond_broadcast(rb_nativethread_cond_t *cond)
{
int r;
do {
@@ -329,7 +329,7 @@ native_cond_broadcast(rb_thread_cond_t *cond)
}
static void
-native_cond_wait(rb_thread_cond_t *cond, pthread_mutex_t *mutex)
+native_cond_wait(rb_nativethread_cond_t *cond, pthread_mutex_t *mutex)
{
int r = pthread_cond_wait(&cond->cond, mutex);
if (r != 0) {
@@ -338,7 +338,7 @@ native_cond_wait(rb_thread_cond_t *cond, pthread_mutex_t *mutex)
}
static int
-native_cond_timedwait(rb_thread_cond_t *cond, pthread_mutex_t *mutex, struct timespec *ts)
+native_cond_timedwait(rb_nativethread_cond_t *cond, pthread_mutex_t *mutex, struct timespec *ts)
{
int r;
@@ -360,7 +360,7 @@ native_cond_timedwait(rb_thread_cond_t *cond, pthread_mutex_t *mutex, struct tim
}
static struct timespec
-native_cond_timeout(rb_thread_cond_t *cond, struct timespec timeout_rel)
+native_cond_timeout(rb_nativethread_cond_t *cond, struct timespec timeout_rel)
{
int ret;
struct timeval tv;
@@ -764,7 +764,7 @@ thread_start_func_1(void *th_ptr)
struct cached_thread_entry {
volatile rb_thread_t **th_area;
- rb_thread_cond_t *cond;
+ rb_nativethread_cond_t *cond;
struct cached_thread_entry *next;
};
@@ -776,7 +776,7 @@ struct cached_thread_entry *cached_thread_root;
static rb_thread_t *
register_cached_thread_and_wait(void)
{
- rb_thread_cond_t cond = { PTHREAD_COND_INITIALIZER, };
+ rb_nativethread_cond_t cond = { PTHREAD_COND_INITIALIZER, };
volatile rb_thread_t *th_area = 0;
struct timeval tv;
struct timespec ts;
@@ -957,7 +957,7 @@ native_sleep(rb_thread_t *th, struct timeval *timeout_tv)
{
struct timespec timeout;
pthread_mutex_t *lock = &th->interrupt_lock;
- rb_thread_cond_t *cond = &th->native_thread_data.sleep_cond;
+ rb_nativethread_cond_t *cond = &th->native_thread_data.sleep_cond;
if (timeout_tv) {
struct timespec timeout_rel;
@@ -1344,7 +1344,7 @@ void rb_thread_wakeup_timer_thread(void) {}
static void rb_thread_wakeup_timer_thread_low(void) {}
static pthread_mutex_t timer_thread_lock;
-static rb_thread_cond_t timer_thread_cond;
+static rb_nativethread_cond_t timer_thread_cond;
static inline void
timer_thread_sleep(rb_global_vm_lock_t* unused)