Commit 636c0912 authored by John Esmet's avatar John Esmet Committed by Yoni Fogel

refs #5351 set the mutex to zero first


git-svn-id: file:///svn/toku/tokudb@49918 c7de825b-a66e-492c-adef-691d508d4ae1
parent 2d9ec955
...@@ -20,6 +20,7 @@ void treenode::init(comparator *cmp) { ...@@ -20,6 +20,7 @@ void treenode::init(comparator *cmp) {
// use an adaptive mutex at each node since we expect the time the // use an adaptive mutex at each node since we expect the time the
// lock is held to be relatively short compared to a context switch. // lock is held to be relatively short compared to a context switch.
// indeed, this improves performance at high thread counts considerably. // indeed, this improves performance at high thread counts considerably.
memset(&m_mutex, 0, sizeof(toku_mutex_t));
toku_pthread_mutexattr_t attr; toku_pthread_mutexattr_t attr;
toku_mutexattr_init(&attr); toku_mutexattr_init(&attr);
toku_mutexattr_settype(&attr, TOKU_MUTEX_ADAPTIVE); toku_mutexattr_settype(&attr, TOKU_MUTEX_ADAPTIVE);
......
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