1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
mame 2008-12-28 03:25:31 +00:00
parent 0e41458700
commit b66af67f21
2 changed files with 7 additions and 3 deletions

View file

@ -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> 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 * thread.c (mutex_free): GC thread (main thread) has failed to unlock

View file

@ -2708,7 +2708,7 @@ thgroup_add(VALUE group, VALUE thread)
#define GetMutexPtr(obj, tobj) \ #define GetMutexPtr(obj, tobj) \
Data_Get_Struct(obj, mutex_t, 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 static void
mutex_free(void *ptr) mutex_free(void *ptr)
@ -2717,7 +2717,7 @@ mutex_free(void *ptr)
mutex_t *mutex = ptr; mutex_t *mutex = ptr;
if (mutex->th) { if (mutex->th) {
/* rb_warn("free locked mutex"); */ /* 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); if (err) rb_bug("%s", err);
} }
native_mutex_destroy(&mutex->lock); native_mutex_destroy(&mutex->lock);
@ -2918,7 +2918,7 @@ rb_mutex_lock(VALUE self)
} }
static const char * 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; const char *err = NULL;
mutex_t *th_mutex; mutex_t *th_mutex;