unlock mutex of surface when tbm_bo_map 13/94813/2
authorChangyeon Lee <cyeon.lee@samsung.com>
Tue, 1 Nov 2016 09:25:40 +0000 (18:25 +0900)
committerBoram Park <boram1288.park@samsung.com>
Wed, 2 Nov 2016 04:23:03 +0000 (21:23 -0700)
Change-Id: I7fa6078d1d39db8cd2afad77093b0cfb22aab256

src/tbm_surface_internal.c
src/tbm_surface_queue.c

index 974902d..104e42b 100644 (file)
@@ -1023,7 +1023,9 @@ tbm_surface_internal_get_info(tbm_surface_h surface, int opt,
 
        if (map == 1) {
                for (i = 0; i < surf->num_bos; i++) {
+                       _tbm_surface_mutex_unlock();
                        bo_handles[i] = tbm_bo_map(surf->bos[i], TBM_DEVICE_CPU, opt);
+                       _tbm_surface_mutex_lock();
                        if (bo_handles[i].ptr == NULL) {
                                for (j = 0; j < i; j++)
                                        tbm_bo_unmap(surf->bos[j]);
index 2b65e02..a77b285 100644 (file)
@@ -1669,6 +1669,7 @@ tbm_surface_queue_sequence_create(int queue_size, int width,
                                   sizeof(tbm_queue_sequence));
        if (data == NULL) {
                free(surface_queue);
+               _tbm_surf_queue_mutex_unlock();
                return NULL;
        }