summaryrefslogtreecommitdiff
path: root/thread_pthread.c
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-05-17 03:54:50 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-05-17 03:54:50 +0000
commit82983e834d2122c3a53c30b166b7eb708da4885f (patch)
tree84069c11ec3cd532d470e54b138fe1ddbf74763e /thread_pthread.c
parent1d7dc02647c13c8f3884fcaa80b7f11415205384 (diff)
* thread.c, thread_pthread.c: Moved pthread-specific preprocessor
hacks to thread_pthread.c git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread_pthread.c')
-rw-r--r--thread_pthread.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/thread_pthread.c b/thread_pthread.c
index 61b93e1edf..05a6af2a45 100644
--- a/thread_pthread.c
+++ b/thread_pthread.c
@@ -245,6 +245,7 @@ int pthread_condattr_init(pthread_condattr_t *attr);
static void
native_cond_initialize(rb_thread_cond_t *cond, int flags)
{
+#ifdef HAVE_PTHREAD_COND_INITIALIZE
int r;
pthread_condattr_t attr;
@@ -266,15 +267,18 @@ native_cond_initialize(rb_thread_cond_t *cond, int flags)
}
return;
- }
+#endif
+}
static void
native_cond_destroy(rb_thread_cond_t *cond)
{
+#ifdef HAVE_PTHREAD_COND_INITIALIZE
int r = pthread_cond_destroy(&cond->cond);
if (r != 0) {
rb_bug_errno("pthread_cond_destroy", r);
}
+#endif
}
#endif