summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--eval.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 0151a2e856..86b7fdac14 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sat Apr 18 19:44:53 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * eval.c (safe_mutex_lock): pthread_cleanup_push() must not be
+ inside parens.
+
Sat Apr 18 18:25:53 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* eval.c (rb_thread_remove): stops timer thread unless other
diff --git a/eval.c b/eval.c
index e7783b4437..e2c3bf1f71 100644
--- a/eval.c
+++ b/eval.c
@@ -12383,8 +12383,8 @@ static struct timer_thread {
} time_thread = {PTHREAD_COND_INITIALIZER, PTHREAD_MUTEX_INITIALIZER};
#define safe_mutex_lock(lock) \
- (pthread_mutex_lock(lock), \
- pthread_cleanup_push((void (*)_((void *)))pthread_mutex_unlock, lock))
+ pthread_mutex_lock(lock); \
+ pthread_cleanup_push((void (*)_((void *)))pthread_mutex_unlock, lock)
static void*
thread_timer(dummy)