* thread_pthread.c: fix compile erros when
USE_SLEEPY_TIMER_THREAD is disabled. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52280 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
67c4c4a069
commit
f2d679c751
@ -1,3 +1,8 @@
|
|||||||
|
Mon Oct 26 01:03:23 2015 Rei Odaira <Rei.Odaira@gmail.com>
|
||||||
|
|
||||||
|
* thread_pthread.c: fix compile erros when
|
||||||
|
USE_SLEEPY_TIMER_THREAD is disabled.
|
||||||
|
|
||||||
Sun Oct 25 10:12:05 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Sun Oct 25 10:12:05 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* symbol.c (op_tbl): add DOTQ for ripper. [Feature #11537]
|
* symbol.c (op_tbl): add DOTQ for ripper. [Feature #11537]
|
||||||
|
@ -1012,6 +1012,7 @@ native_thread_create(rb_thread_t *th)
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if USE_SLEEPY_TIMER_THREAD
|
||||||
static void
|
static void
|
||||||
native_thread_join(pthread_t th)
|
native_thread_join(pthread_t th)
|
||||||
{
|
{
|
||||||
@ -1020,6 +1021,7 @@ native_thread_join(pthread_t th)
|
|||||||
rb_raise(rb_eThreadError, "native_thread_join() failed (%d)", err);
|
rb_raise(rb_eThreadError, "native_thread_join() failed (%d)", err);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if USE_NATIVE_THREAD_PRIORITY
|
#if USE_NATIVE_THREAD_PRIORITY
|
||||||
@ -1644,10 +1646,12 @@ rb_thread_create_timer_thread(void)
|
|||||||
if (err != 0) {
|
if (err != 0) {
|
||||||
rb_warn("pthread_create failed for timer: %s, scheduling broken",
|
rb_warn("pthread_create failed for timer: %s, scheduling broken",
|
||||||
strerror(err));
|
strerror(err));
|
||||||
|
#if USE_SLEEPY_TIMER_THREAD
|
||||||
CLOSE_INVALIDATE(normal[0]);
|
CLOSE_INVALIDATE(normal[0]);
|
||||||
CLOSE_INVALIDATE(normal[1]);
|
CLOSE_INVALIDATE(normal[1]);
|
||||||
CLOSE_INVALIDATE(low[0]);
|
CLOSE_INVALIDATE(low[0]);
|
||||||
CLOSE_INVALIDATE(low[1]);
|
CLOSE_INVALIDATE(low[1]);
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
timer_thread.created = 1;
|
timer_thread.created = 1;
|
||||||
@ -1664,6 +1668,7 @@ native_stop_timer_thread(void)
|
|||||||
stopped = --system_working <= 0;
|
stopped = --system_working <= 0;
|
||||||
|
|
||||||
if (TT_DEBUG) fprintf(stderr, "stop timer thread\n");
|
if (TT_DEBUG) fprintf(stderr, "stop timer thread\n");
|
||||||
|
#if USE_SLEEPY_TIMER_THREAD
|
||||||
if (stopped) {
|
if (stopped) {
|
||||||
/* prevent wakeups from signal handler ASAP */
|
/* prevent wakeups from signal handler ASAP */
|
||||||
timer_thread_pipe.owner_process = 0;
|
timer_thread_pipe.owner_process = 0;
|
||||||
@ -1691,6 +1696,7 @@ native_stop_timer_thread(void)
|
|||||||
if (TT_DEBUG) fprintf(stderr, "joined timer thread\n");
|
if (TT_DEBUG) fprintf(stderr, "joined timer thread\n");
|
||||||
timer_thread.created = 0;
|
timer_thread.created = 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
return stopped;
|
return stopped;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user