summaryrefslogtreecommitdiff
path: root/thread_win32.c
diff options
context:
space:
mode:
authork0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-16 10:02:03 (GMT)
committerk0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-16 10:02:03 (GMT)
commit22c8cc44a27cceebc48418b2b05e0a6e1638994b (patch)
treefd89dc38ad3da924cf1c0351b7a36b55986eeebd /thread_win32.c
parentea4b535579a77fc7f49bc00bc8d95f802b1d9ad4 (diff)
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
Diffstat (limited to 'thread_win32.c')
-rw-r--r--thread_win32.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/thread_win32.c b/thread_win32.c
index e0d79d7..5619fb4 100644
--- a/thread_win32.c
+++ b/thread_win32.c
@@ -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