diff options
author | Krishnan Parthasarathi <kparthas@redhat.com> | 2013-05-22 00:18:04 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2013-05-23 07:24:42 -0700 |
commit | 3d68ed8fbb41be06c222aa7754b36e77edced92a (patch) | |
tree | e9f3fbc64ccf8e1934820396f0fc9035e4908cb9 /libglusterfs/src/syncop.c | |
parent | 418f763303ec4003f4b805867ff306a2e43bca76 (diff) |
syncop: synctask shouldn't yawn, it could miss a 'wake'
Backport of http://review.gluster.org/5058
Change-Id: I7731fd33ca0c925cc52f8d105275b44fc625a1e2
BUG: 948686
Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-on: http://review.gluster.org/5071
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Diffstat (limited to 'libglusterfs/src/syncop.c')
-rw-r--r-- | libglusterfs/src/syncop.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/libglusterfs/src/syncop.c b/libglusterfs/src/syncop.c index 964e6dd2a..153e74db0 100644 --- a/libglusterfs/src/syncop.c +++ b/libglusterfs/src/syncop.c @@ -101,21 +101,6 @@ synctask_yield (struct synctask *task) void -synctask_yawn (struct synctask *task) -{ - struct syncenv *env = NULL; - - env = task->env; - - pthread_mutex_lock (&env->mutex); - { - task->woken = 0; - } - pthread_mutex_unlock (&env->mutex); -} - - -void synctask_wake (struct synctask *task) { struct syncenv *env = NULL; @@ -533,7 +518,6 @@ __synclock_lock (struct synclock *lock) /* called within a synctask */ list_add_tail (&task->waitq, &lock->waitq); pthread_mutex_unlock (&lock->guard); - synctask_yawn (task); synctask_yield (task); /* task is removed from waitq in unlock, * under lock->guard.*/ @@ -689,7 +673,6 @@ __syncbarrier_wait (struct syncbarrier *barrier, int waitfor) /* called within a synctask */ list_add_tail (&task->waitq, &barrier->waitq); pthread_mutex_unlock (&barrier->guard); - synctask_yawn (task); synctask_yield (task); pthread_mutex_lock (&barrier->guard); } else { |