[前][次][番号順一覧][スレッド一覧]

ruby-changes:9566

From: mame <ko1@a...>
Date: Sun, 28 Dec 2008 12:25:51 +0900 (JST)
Subject: [ruby-changes:9566] Ruby:r21106 (trunk): * thread.c (mutex_free, mutex_unlock): add qualifiers.

mame	2008-12-28 12:25:31 +0900 (Sun, 28 Dec 2008)

  New Revision: 21106

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=21106

  Log:
    * thread.c (mutex_free, mutex_unlock): add qualifiers.

  Modified files:
    trunk/ChangeLog
    trunk/thread.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 21105)
+++ ChangeLog	(revision 21106)
@@ -1,3 +1,7 @@
+Sun Dec 28 12:24:14 2008  Yusuke Endoh  <mame@t...>
+
+	* thread.c (mutex_free, mutex_unlock): add qualifiers.
+
 Sun Dec 28 10:28:04 2008  Yusuke Endoh  <mame@t...>
 
 	* thread.c (mutex_free): GC thread (main thread) has failed to unlock
Index: thread.c
===================================================================
--- thread.c	(revision 21105)
+++ thread.c	(revision 21106)
@@ -2708,7 +2708,7 @@
 #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_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 @@
 }
 
 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;

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]