aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-02-14 12:15:39 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-02-14 12:15:39 +0000
commitb1c1f4957f820b6599a074e9fdc4bc3cb28bbee3 (patch)
tree9f5d2e746eb413a073dd92e69cb76cb4269d4cc1
parent3044252bebc3e42530a6d90c7ef55c83e2f1ad74 (diff)
downloadruby-b1c1f4957f820b6599a074e9fdc4bc3cb28bbee3.tar.gz
* thread_pthread.ci (native_thread_create): adjust 4KB (page size)
alignment. * thread_pthread.ci (CHECK_ERR): call rb_bug() instead of printf() and exit(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog8
-rw-r--r--thread_pthread.ci5
2 files changed, 11 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 0ce09c899d..64680203a4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Wed Feb 14 21:12:36 2007 Koichi Sasada <ko1@atdot.net>
+
+ * thread_pthread.ci (native_thread_create): adjust 4KB (page size)
+ alignment.
+
+ * thread_pthread.ci (CHECK_ERR): call rb_bug()
+ instead of printf() and exit().
+
Wed Feb 14 16:48:56 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
* lib/date/format.rb (Date::Format::Bag::method_missing): need not
diff --git a/thread_pthread.ci b/thread_pthread.ci
index 20f24b0b91..17b9a81431 100644
--- a/thread_pthread.ci
+++ b/thread_pthread.ci
@@ -218,7 +218,7 @@ use_cached_thread(rb_thread_t *th)
}
#define CHECK_ERR(expr) \
- { int err; if ((err = (expr)) != 0) { printf("err: %d - " #expr, err); exit(1); }}
+ { int err; if ((err = (expr)) != 0) { rb_bug("err: %d - %s", err, #expr); }}
static int
native_thread_create(rb_thread_t *th)
@@ -238,10 +238,10 @@ native_thread_create(rb_thread_t *th)
}
#endif
- thread_debug("create: %p, stack size: %ld\n", th, stack_size);
CHECK_ERR(pthread_attr_init(&attr));
#ifdef PTHREAD_STACK_MIN
+ thread_debug("create - stack size: %ld\n", th, stack_size);
CHECK_ERR(pthread_attr_setstacksize(&attr, stack_size));
#endif
@@ -249,6 +249,7 @@ native_thread_create(rb_thread_t *th)
CHECK_ERR(pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED));
err = pthread_create(&th->thread_id, &attr, thread_start_func_1, th);
+ thread_debug("create: %p (%d)", th, err);
CHECK_ERR(pthread_attr_destroy(&attr));
if (err != 0) {