ruby-changes:40199
From: odaira <ko1@a...>
Date: Mon, 26 Oct 2015 01:07:42 +0900 (JST)
Subject: [ruby-changes:40199] odaira:r52280 (trunk): * thread_pthread.c: fix compile erros when
odaira 2015-10-26 01:07:25 +0900 (Mon, 26 Oct 2015) New Revision: 52280 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=52280 Log: * thread_pthread.c: fix compile erros when USE_SLEEPY_TIMER_THREAD is disabled. Modified files: trunk/ChangeLog trunk/thread_pthread.c Index: ChangeLog =================================================================== --- ChangeLog (revision 52279) +++ ChangeLog (revision 52280) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Mon Oct 26 01:03:23 2015 Rei Odaira <Rei.Odaira@g...> + + * thread_pthread.c: fix compile erros when + USE_SLEEPY_TIMER_THREAD is disabled. + Sun Oct 25 10:12:05 2015 Nobuyoshi Nakada <nobu@r...> * symbol.c (op_tbl): add DOTQ for ripper. [Feature #11537] Index: thread_pthread.c =================================================================== --- thread_pthread.c (revision 52279) +++ thread_pthread.c (revision 52280) @@ -1012,6 +1012,7 @@ native_thread_create(rb_thread_t *th) https://github.com/ruby/ruby/blob/trunk/thread_pthread.c#L1012 return err; } +#if USE_SLEEPY_TIMER_THREAD static void native_thread_join(pthread_t th) { @@ -1020,6 +1021,7 @@ native_thread_join(pthread_t th) https://github.com/ruby/ruby/blob/trunk/thread_pthread.c#L1021 rb_raise(rb_eThreadError, "native_thread_join() failed (%d)", err); } } +#endif #if USE_NATIVE_THREAD_PRIORITY @@ -1644,10 +1646,12 @@ rb_thread_create_timer_thread(void) https://github.com/ruby/ruby/blob/trunk/thread_pthread.c#L1646 if (err != 0) { rb_warn("pthread_create failed for timer: %s, scheduling broken", strerror(err)); +#if USE_SLEEPY_TIMER_THREAD CLOSE_INVALIDATE(normal[0]); CLOSE_INVALIDATE(normal[1]); CLOSE_INVALIDATE(low[0]); CLOSE_INVALIDATE(low[1]); +#endif return; } timer_thread.created = 1; @@ -1664,6 +1668,7 @@ native_stop_timer_thread(void) https://github.com/ruby/ruby/blob/trunk/thread_pthread.c#L1668 stopped = --system_working <= 0; if (TT_DEBUG) fprintf(stderr, "stop timer thread\n"); +#if USE_SLEEPY_TIMER_THREAD if (stopped) { /* prevent wakeups from signal handler ASAP */ timer_thread_pipe.owner_process = 0; @@ -1691,6 +1696,7 @@ native_stop_timer_thread(void) https://github.com/ruby/ruby/blob/trunk/thread_pthread.c#L1696 if (TT_DEBUG) fprintf(stderr, "joined timer thread\n"); timer_thread.created = 0; } +#endif return stopped; } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/