From: Changyeon Lee Date: Tue, 27 Nov 2018 03:49:48 +0000 (+0900) Subject: queue: don't unlock mutex before call alloc callback X-Git-Tag: accepted/tizen/5.0/unified/20181128.144703~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=197f7ae3460ee6e7d55bf19c434c9c6495e767fa;p=platform%2Fcore%2Fuifw%2Flibtbm.git queue: don't unlock mutex before call alloc callback tbm_surface_queue function must not be called in alloc callback Change-Id: Ia4b6f1dee6c54395ae9de368868fdaae1ad765ed --- diff --git a/src/tbm_surface_queue.c b/src/tbm_surface_queue.c index 28acf5a..764192d 100644 --- a/src/tbm_surface_queue.c +++ b/src/tbm_surface_queue.c @@ -2048,11 +2048,7 @@ __tbm_queue_default_need_attach(tbm_surface_queue_h surface_queue) return; if (surface_queue->alloc_cb) { - pthread_mutex_unlock(&surface_queue->lock); - _tbm_surf_queue_mutex_unlock(); surface = surface_queue->alloc_cb(surface_queue, surface_queue->alloc_cb_data); - _tbm_surf_queue_mutex_lock(); - pthread_mutex_lock(&surface_queue->lock); /* silent return */ if (!surface) @@ -2167,11 +2163,7 @@ __tbm_queue_sequence_need_attach(tbm_surface_queue_h surface_queue) return; if (surface_queue->alloc_cb) { - pthread_mutex_unlock(&surface_queue->lock); - _tbm_surf_queue_mutex_unlock(); surface = surface_queue->alloc_cb(surface_queue, surface_queue->alloc_cb_data); - _tbm_surf_queue_mutex_lock(); - pthread_mutex_lock(&surface_queue->lock); /* silent return */ if (!surface)