diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-25 04:35:17 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-25 04:35:17 +0000 |
commit | 42f0b52f771570adebbea518fa2464bd227bca99 (patch) | |
tree | 3234bc211c8ace175fee09184752e3814993b317 /thread_pthread.c | |
parent | f3945617bd2ed8f4282bc21023f0aea1aa166654 (diff) | |
download | ruby-42f0b52f771570adebbea518fa2464bd227bca99.tar.gz |
* thread_pthread.c, thread_pthread.h, thread_win32.c,
thread_win32.c: make some functions static functions.
a patch from Tadashi Saito <shiba AT mail2.accsnet.ne.jp>
in [ruby-core:14407]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread_pthread.c')
-rw-r--r-- | thread_pthread.c | 33 |
1 files changed, 23 insertions, 10 deletions
diff --git a/thread_pthread.c b/thread_pthread.c index 5a3770520f..daeca964a7 100644 --- a/thread_pthread.c +++ b/thread_pthread.c @@ -12,7 +12,20 @@ #ifdef THREAD_SYSTEM_DEPENDENT_IMPLEMENTATION -void +static void native_mutex_lock(pthread_mutex_t *lock); +static void native_mutex_unlock(pthread_mutex_t *lock); +static void native_mutex_destroy(pthread_mutex_t *lock); +static int native_mutex_trylock(pthread_mutex_t *lock); +static void native_mutex_initialize(pthread_mutex_t *lock); +static void native_mutex_destroy(pthread_mutex_t *lock); + +static void native_cond_signal(pthread_cond_t *cond); +static void native_cond_broadcast(pthread_cond_t *cond); +static void native_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex); +static void native_cond_initialize(pthread_cond_t *cond); +static void native_cond_destroy(pthread_cond_t *cond); + +static void native_mutex_lock(pthread_mutex_t *lock) { int r; @@ -21,7 +34,7 @@ native_mutex_lock(pthread_mutex_t *lock) } } -void +static void native_mutex_unlock(pthread_mutex_t *lock) { int r; @@ -30,7 +43,7 @@ native_mutex_unlock(pthread_mutex_t *lock) } } -inline int +static inline int native_mutex_trylock(pthread_mutex_t *lock) { int r; @@ -45,7 +58,7 @@ native_mutex_trylock(pthread_mutex_t *lock) return 0; } -void +static void native_mutex_initialize(pthread_mutex_t *lock) { int r = pthread_mutex_init(lock, 0); @@ -54,7 +67,7 @@ native_mutex_initialize(pthread_mutex_t *lock) } } -void +static void native_mutex_destroy(pthread_mutex_t *lock) { int r = pthread_mutex_destroy(lock); @@ -63,7 +76,7 @@ native_mutex_destroy(pthread_mutex_t *lock) } } -void +static void native_cond_initialize(pthread_cond_t *cond) { int r = pthread_cond_init(cond, 0); @@ -72,7 +85,7 @@ native_cond_initialize(pthread_cond_t *cond) } } -void +static void native_cond_destroy(pthread_cond_t *cond) { int r = pthread_cond_destroy(cond); @@ -81,19 +94,19 @@ native_cond_destroy(pthread_cond_t *cond) } } -void +static void native_cond_signal(pthread_cond_t *cond) { pthread_cond_signal(cond); } -void +static void native_cond_broadcast(pthread_cond_t *cond) { pthread_cond_broadcast(cond); } -void +static void native_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex) { pthread_cond_wait(cond, mutex); |