summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--thread_win32.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/thread_win32.c b/thread_win32.c
index e0d79d750a..5619fb462c 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