mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
* 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
This commit is contained in:
parent
f3945617bd
commit
42f0b52f77
5 changed files with 51 additions and 44 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue