mirror of
https://github.com/ruby/ruby.git
synced 2025-09-16 09:04:05 +02:00
merges r29962 from trunk into ruby_1_9_2.
-- * thread_pthread.c (native_cond_*): Check return code. (Some OSs except Linux return error code). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
479bf5e516
commit
32d4fcdc92
3 changed files with 23 additions and 5 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Mon Nov 29 05:54:22 2010 Koichi Sasada <ko1@atdot.net>
|
||||||
|
|
||||||
|
* thread_pthread.c (native_cond_*): Check return code.
|
||||||
|
(Some OSs except Linux return error code).
|
||||||
|
|
||||||
Sat Nov 27 19:12:10 2010 Tanaka Akira <akr@fsij.org>
|
Sat Nov 27 19:12:10 2010 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
* time.c: parenthesize macro arguments.
|
* time.c: parenthesize macro arguments.
|
||||||
|
|
|
@ -106,25 +106,38 @@ native_cond_destroy(pthread_cond_t *cond)
|
||||||
static void
|
static void
|
||||||
native_cond_signal(pthread_cond_t *cond)
|
native_cond_signal(pthread_cond_t *cond)
|
||||||
{
|
{
|
||||||
pthread_cond_signal(cond);
|
int r = pthread_cond_signal(cond);
|
||||||
|
if (r != 0) {
|
||||||
|
rb_bug_errno("pthread_cond_signal", r);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
native_cond_broadcast(pthread_cond_t *cond)
|
native_cond_broadcast(pthread_cond_t *cond)
|
||||||
{
|
{
|
||||||
pthread_cond_broadcast(cond);
|
int r = pthread_cond_broadcast(cond);
|
||||||
|
if (r != 0) {
|
||||||
|
rb_bug_errno("native_cond_broadcast", r);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
native_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex)
|
native_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex)
|
||||||
{
|
{
|
||||||
pthread_cond_wait(cond, mutex);
|
int r = pthread_cond_wait(cond, mutex);
|
||||||
|
if (r != 0) {
|
||||||
|
rb_bug_errno("pthread_cond_wait", r);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
native_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, struct timespec *ts)
|
native_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, struct timespec *ts)
|
||||||
{
|
{
|
||||||
return pthread_cond_timedwait(cond, mutex, ts);
|
int r = pthread_cond_timedwait(cond, mutex, ts);
|
||||||
|
if (r != 0 && r != ETIMEDOUT && r != EINTR /* Linux */) {
|
||||||
|
rb_bug_errno("pthread_cond_timedwait", r);
|
||||||
|
}
|
||||||
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#define RUBY_VERSION "1.9.2"
|
#define RUBY_VERSION "1.9.2"
|
||||||
#define RUBY_PATCHLEVEL 109
|
#define RUBY_PATCHLEVEL 110
|
||||||
#define RUBY_VERSION_MAJOR 1
|
#define RUBY_VERSION_MAJOR 1
|
||||||
#define RUBY_VERSION_MINOR 9
|
#define RUBY_VERSION_MINOR 9
|
||||||
#define RUBY_VERSION_TEENY 1
|
#define RUBY_VERSION_TEENY 1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue