From 4c993514184032f35eb037d8697aeea100c48aed Mon Sep 17 00:00:00 2001 From: Kasper Kopec Date: Wed, 9 Mar 2016 18:08:38 -0800 Subject: [PATCH] Change #elseif to #else in hh_shared.c, make locking actually do something Summary:I've tested everything and then added "#ifdef _WIN32" guards to "make hh_shared.c compile for flow". Turns out "#elseif" is not a thing and the entire method bodes were preprocessed away. clowntown Reviewed By: int3 Differential Revision: D3032301 fb-gh-sync-id: 95373bea7a522f7f69efdc26b885c788fa33c1e7 shipit-source-id: 95373bea7a522f7f69efdc26b885c788fa33c1e7 --- hphp/hack/src/heap/hh_shared.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hphp/hack/src/heap/hh_shared.c b/hphp/hack/src/heap/hh_shared.c index ee0e82c882b..2d7995c17c6 100644 --- a/hphp/hack/src/heap/hh_shared.c +++ b/hphp/hack/src/heap/hh_shared.c @@ -245,7 +245,7 @@ value hh_hashtable_mutex_lock() { CAMLparam0(); #ifdef _WIN32 // TODO -#elseif +#else int res = pthread_mutex_lock(&hashtable_mutex); if (res != 0) { caml_failwith("Error acquiring the lock"); @@ -259,7 +259,7 @@ value hh_hashtable_mutex_trylock() { int res = 0; #ifdef _WIN32 // TODO -#elseif +#else res = pthread_mutex_trylock(&hashtable_mutex); if ((res != 0 ) && (res != EBUSY)) { caml_failwith("Error trying to acquire the lock"); @@ -270,9 +270,9 @@ value hh_hashtable_mutex_trylock() { value hh_hashtable_mutex_unlock() { CAMLparam0(); -#ifdef _WIN33 +#ifdef _WIN32 // TODO -#elseif +#else int res = pthread_mutex_unlock(&hashtable_mutex); if (res != 0) { caml_failwith("Error releasing the lock");\ -- 2.11.4.GIT