Commit 317c6994 authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

#4443 fix the lock and unlock worker op functions refs[t:4443]

git-svn-id: file:///svn/toku/tokudb@39675 c7de825b-a66e-492c-adef-691d508d4ae1
parent f964b6a3
...@@ -121,7 +121,7 @@ struct worker_extra { ...@@ -121,7 +121,7 @@ struct worker_extra {
static void lock_worker_op(struct worker_extra* we) { static void lock_worker_op(struct worker_extra* we) {
ARG arg = we->thread_arg; ARG arg = we->thread_arg;
if (arg->lock_type != STRESS_LOCK_NONE) { if (arg->lock_type != STRESS_LOCK_NONE) {
if (0) toku_pthread_mutex_lock(we->operation_lock_mutex); toku_pthread_mutex_lock(we->operation_lock_mutex);
if (arg->lock_type == STRESS_LOCK_SHARED) { if (arg->lock_type == STRESS_LOCK_SHARED) {
rwlock_read_lock(we->operation_lock, we->operation_lock_mutex); rwlock_read_lock(we->operation_lock, we->operation_lock_mutex);
} else if (arg->lock_type == STRESS_LOCK_EXCL) { } else if (arg->lock_type == STRESS_LOCK_EXCL) {
...@@ -129,14 +129,14 @@ static void lock_worker_op(struct worker_extra* we) { ...@@ -129,14 +129,14 @@ static void lock_worker_op(struct worker_extra* we) {
} else { } else {
assert(false); assert(false);
} }
if (0) toku_pthread_mutex_unlock(we->operation_lock_mutex); toku_pthread_mutex_unlock(we->operation_lock_mutex);
} }
} }
static void unlock_worker_op(struct worker_extra* we) { static void unlock_worker_op(struct worker_extra* we) {
ARG arg = we->thread_arg; ARG arg = we->thread_arg;
if (arg->lock_type != STRESS_LOCK_NONE) { if (arg->lock_type != STRESS_LOCK_NONE) {
if (0) toku_pthread_mutex_lock(we->operation_lock_mutex); toku_pthread_mutex_lock(we->operation_lock_mutex);
if (arg->lock_type == STRESS_LOCK_SHARED) { if (arg->lock_type == STRESS_LOCK_SHARED) {
rwlock_read_unlock(we->operation_lock); rwlock_read_unlock(we->operation_lock);
} else if (arg->lock_type == STRESS_LOCK_EXCL) { } else if (arg->lock_type == STRESS_LOCK_EXCL) {
...@@ -144,7 +144,7 @@ static void unlock_worker_op(struct worker_extra* we) { ...@@ -144,7 +144,7 @@ static void unlock_worker_op(struct worker_extra* we) {
} else { } else {
assert(false); assert(false);
} }
if (0) toku_pthread_mutex_unlock(we->operation_lock_mutex); toku_pthread_mutex_unlock(we->operation_lock_mutex);
} }
} }
......
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