This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

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.
  • Loading branch information...
piscisaureus committed Oct 3, 2012
1 parent fed718c commit 744dc3e77c9b914e3863c821f5b0c951de4db0cb
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/win/thread.c
View
@@ -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

0 comments on commit 744dc3e

Please sign in to comment.