diff options
author | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-06-20 12:32:35 +0000 |
---|---|---|
committer | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-06-20 12:32:35 +0000 |
commit | 2552e428f3f89adbec3a548cf7b943b6b1318c24 (patch) | |
tree | b0203699a618c1b0317cf060f12003a4ef13904d | |
parent | c102821291a31a729a3aa49d3f7be0900b3cb03c (diff) |
* thread_pthread.c (thread_timer): rename timeout_10ms to
time_quantum. it's no longer 10ms.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | thread_pthread.c | 10 |
2 files changed, 10 insertions, 5 deletions
@@ -1,3 +1,8 @@ +Mon Jun 20 21:31:03 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com> + + * thread_pthread.c (thread_timer): rename timeout_10ms to + time_quantum. it's no longer 10ms. + Mon Jun 20 18:46:02 2011 Hiroshi Nakamura <nahi@ruby-lang.org> * ext/openssl/ossl_cipher.c, ext/openssl/lib/openssl/cipher.rb: diff --git a/thread_pthread.c b/thread_pthread.c index ba202f48e0..2662971daa 100644 --- a/thread_pthread.c +++ b/thread_pthread.c @@ -984,15 +984,15 @@ static pthread_mutex_t timer_thread_lock = PTHREAD_MUTEX_INITIALIZER; static void * thread_timer(void *dummy) { - struct timespec timeout_10ms; + struct timespec time_quantum; struct timespec timeout; - timeout_10ms.tv_sec = 0; - timeout_10ms.tv_nsec = TIME_QUANTUM_USEC * 1000; + time_quantum.tv_sec = 0; + time_quantum.tv_nsec = TIME_QUANTUM_USEC * 1000; native_mutex_lock(&timer_thread_lock); native_cond_broadcast(&timer_thread_cond); - timeout = native_cond_timeout(&timer_thread_cond, timeout_10ms); + timeout = native_cond_timeout(&timer_thread_cond, time_quantum); while (system_working > 0) { int err; @@ -1008,7 +1008,7 @@ thread_timer(void *dummy) else if (err == ETIMEDOUT) { ping_signal_thread_list(); timer_thread_function(dummy); - timeout = native_cond_timeout(&timer_thread_cond, timeout_10ms); + timeout = native_cond_timeout(&timer_thread_cond, time_quantum); } else rb_bug_errno("thread_timer/timedwait", err); |