thread_win32.c: stop returning unused value

to unify signature with pthread's one

I'm planning to use functions for rb_nativethread_cond_t and
rb_nativethread_mutex_t in the future JIT introduction.

In that case, I want them to have the same signature. To prevent the case
that its return value is used in somewhere and it becomes harder to unify
signature, I want to drop unused return value.

[close GH-1751]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
k0kubun 2017-11-16 10:02:03 +00:00
parent ea4b535579
commit 22c8cc44a2
1 changed files with 7 additions and 9 deletions

View File

@ -24,8 +24,8 @@
static volatile DWORD ruby_native_thread_key = TLS_OUT_OF_INDEXES;
static int w32_wait_events(HANDLE *events, int count, DWORD timeout, rb_thread_t *th);
static int native_mutex_lock(rb_nativethread_lock_t *lock);
static int native_mutex_unlock(rb_nativethread_lock_t *lock);
static void native_mutex_lock(rb_nativethread_lock_t *lock);
static void native_mutex_unlock(rb_nativethread_lock_t *lock);
static void
w32_error(const char *func)
@ -302,7 +302,7 @@ native_sleep(rb_thread_t *th, struct timeval *tv)
GVL_UNLOCK_END();
}
static int
static void
native_mutex_lock(rb_nativethread_lock_t *lock)
{
#if USE_WIN32_MUTEX
@ -310,18 +310,16 @@ native_mutex_lock(rb_nativethread_lock_t *lock)
#else
EnterCriticalSection(&lock->crit);
#endif
return 0;
}
static int
static void
native_mutex_unlock(rb_nativethread_lock_t *lock)
{
#if USE_WIN32_MUTEX
thread_debug("release mutex: %p\n", lock->mutex);
return ReleaseMutex(lock->mutex);
ReleaseMutex(lock->mutex);
#else
LeaveCriticalSection(&lock->crit);
return 0;
#endif
}
@ -444,10 +442,10 @@ native_cond_timedwait_ms(rb_nativethread_cond_t *cond, rb_nativethread_lock_t *m
return (r == WAIT_OBJECT_0) ? 0 : ETIMEDOUT;
}
static int
static void
native_cond_wait(rb_nativethread_cond_t *cond, rb_nativethread_lock_t *mutex)
{
return native_cond_timedwait_ms(cond, mutex, INFINITE);
native_cond_timedwait_ms(cond, mutex, INFINITE);
}
static unsigned long