diff options
Diffstat (limited to 'libglusterfs/src/syncop.h')
-rw-r--r-- | libglusterfs/src/syncop.h | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/libglusterfs/src/syncop.h b/libglusterfs/src/syncop.h index d27c19d7011..9344d706788 100644 --- a/libglusterfs/src/syncop.h +++ b/libglusterfs/src/syncop.h @@ -148,13 +148,11 @@ struct syncargs { #define __yawn(args) do { \ args->task = synctask_get (); \ - if (args->task) { \ - synctask_yawn (args->task); \ - } else { \ - pthread_mutex_init (&args->mutex, NULL); \ - pthread_cond_init (&args->cond, NULL); \ - args->done = 0; \ - } \ + if (args->task) \ + break; \ + pthread_mutex_init (&args->mutex, NULL); \ + pthread_cond_init (&args->cond, NULL); \ + args->done = 0; \ } while (0) @@ -226,7 +224,6 @@ void syncenv_scale (struct syncenv *env); int synctask_new (struct syncenv *, synctask_fn_t, synctask_cbk_t, call_frame_t* frame, void *); void synctask_wake (struct synctask *task); void synctask_yield (struct synctask *task); -void synctask_yawn (struct synctask *task); void synctask_waitfor (struct synctask *task, int count); #define synctask_barrier_init(args) syncbarrier_init (&args->barrier) |