Commit ec79d0fa authored by Yoni Fogel's avatar Yoni Fogel

Port to OSX.

#if defined(__APPLE__)
static pthread_mutex_t ydb_big_lock = PTHREAD_MUTEX_INITIALIZER;
#else
static pthread_mutex_t ydb_big_lock = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP;
#endif

Unsure if this does the same thing for apple.
Addresses #280

git-svn-id: file:///svn/tokudb@1696 c7de825b-a66e-492c-adef-691d508d4ae1
parent d65552f3
...@@ -32,7 +32,11 @@ const char *toku_copyright_string = "Copyright (c) 2007 Tokutek Inc. All rights ...@@ -32,7 +32,11 @@ const char *toku_copyright_string = "Copyright (c) 2007 Tokutek Inc. All rights
every call (including methods) into the tokudb library gets the lock every call (including methods) into the tokudb library gets the lock
no internal function should invoke a method through an object */ no internal function should invoke a method through an object */
#if defined(__APPLE__)
static pthread_mutex_t ydb_big_lock = PTHREAD_MUTEX_INITIALIZER;
#else
static pthread_mutex_t ydb_big_lock = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP; static pthread_mutex_t ydb_big_lock = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP;
#endif
static inline void ydb_lock() { static inline void ydb_lock() {
int r = pthread_mutex_lock(&ydb_big_lock); assert(r == 0); int r = pthread_mutex_lock(&ydb_big_lock); assert(r == 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment