From 744dc3e77c9b914e3863c821f5b0c951de4db0cb Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Thu, 4 Oct 2012 01:21:30 +0200 Subject: [PATCH] windows: make uv_rwlock_init initialize libuv Without this patch, the fallback implementation would be used if uv_rwlock_init were to be called before a loop was created or uv_default_loop() was called. --- src/win/thread.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/win/thread.c b/src/win/thread.c index cb2ba4ec6..dad2b9fb9 100644 --- a/src/win/thread.c +++ b/src/win/thread.c @@ -140,6 +140,8 @@ void uv_mutex_unlock(uv_mutex_t* mutex) { int uv_rwlock_init(uv_rwlock_t* rwlock) { + uv__once_init(); + if (HAVE_SRWLOCK_API()) return uv__rwlock_srwlock_init(rwlock); else