summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--thread.c6
2 files changed, 7 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index d64314f836..1b80570ba3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Sun Dec 28 12:24:14 2008 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * thread.c (mutex_free, mutex_unlock): add qualifiers.
+
Sun Dec 28 10:28:04 2008 Yusuke Endoh <mame@tsg.ne.jp>
* thread.c (mutex_free): GC thread (main thread) has failed to unlock
diff --git a/thread.c b/thread.c
index e6bae4e678..b21af09db9 100644
--- a/thread.c
+++ b/thread.c
@@ -2708,7 +2708,7 @@ thgroup_add(VALUE group, VALUE thread)
#define GetMutexPtr(obj, tobj) \
Data_Get_Struct(obj, mutex_t, tobj)
-static const char *mutex_unlock(mutex_t *mutex, rb_thread_t *th);
+static const char *mutex_unlock(mutex_t *mutex, rb_thread_t volatile *th);
static void
mutex_free(void *ptr)
@@ -2717,7 +2717,7 @@ mutex_free(void *ptr)
mutex_t *mutex = ptr;
if (mutex->th) {
/* rb_warn("free locked mutex"); */
- char *err = mutex_unlock(mutex, mutex->th);
+ const char *err = mutex_unlock(mutex, mutex->th);
if (err) rb_bug("%s", err);
}
native_mutex_destroy(&mutex->lock);
@@ -2918,7 +2918,7 @@ rb_mutex_lock(VALUE self)
}
static const char *
-mutex_unlock(mutex_t *mutex, rb_thread_t *th)
+mutex_unlock(mutex_t *mutex, rb_thread_t volatile *th)
{
const char *err = NULL;
mutex_t *th_mutex;