diff options
author | SooChan Lim <sc1.lim@samsung.com> | 2013-08-14 11:05:03 +0900 |
---|---|---|
committer | Boram Park <boram1288.park@samsung.com> | 2014-03-14 13:52:49 +0900 |
commit | ae239898e9e011b8893c739e850c3ba3f1b76815 (patch) | |
tree | 9049d1800cf88e226bd18e14a96ecaf3d0388d94 | |
parent | ecc409c142cd77b1d92cb35f444099e2c782b6ad (diff) | |
download | libtbm-ae239898e9e011b8893c739e850c3ba3f1b76815.tar.gz libtbm-ae239898e9e011b8893c739e850c3ba3f1b76815.tar.bz2 libtbm-ae239898e9e011b8893c739e850c3ba3f1b76815.zip |
lock before map and unlock after unmaptizen_3.0.m14.2_ivi_releasesubmit/tizen/20140409.005132submit/devel/x11/20140718.035926accepted/tizen/mobile/20140702.071654accepted/tizen/ivi/20140410.192424accepted/tizen/generic/20140415.103911tizen_3.0.m14.2_ividevel/x11accepted/tizen_generic
Change-Id: If81c5083f345d6bdeac0d9d33cd2e861ab885318
-rw-r--r-- | packaging/libtbm.spec | 2 | ||||
-rwxr-xr-x | src/tbm_bufmgr.c | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/packaging/libtbm.spec b/packaging/libtbm.spec index 0c8dbc6..7567a07 100644 --- a/packaging/libtbm.spec +++ b/packaging/libtbm.spec @@ -1,6 +1,6 @@ Name: libtbm Version: 1.0.6 -Release: 4 +Release: 5 License: MIT Summary: Tizen Buffer Manager Library Group: System/Libraries diff --git a/src/tbm_bufmgr.c b/src/tbm_bufmgr.c index 417ef11..3e7c3b8 100755 --- a/src/tbm_bufmgr.c +++ b/src/tbm_bufmgr.c @@ -1193,10 +1193,12 @@ tbm_bo_map (tbm_bo bo, int device, int opt) pthread_mutex_lock (&bufmgr->lock); - bo_handle = bufmgr->backend->bo_map (bo, device, opt); + bo_handle = bufmgr->backend->bo_get_handle (bo, device); _tbm_bo_lock (bo, device, opt); + bo_handle = bufmgr->backend->bo_map (bo, device, opt); + if (bufmgr->use_map_cache == 1 && bo->map_cnt == 0) _tbm_bo_set_state (bo, device, opt); @@ -1220,7 +1222,6 @@ tbm_bo_unmap (tbm_bo bo) pthread_mutex_lock (&bufmgr->lock); - _tbm_bo_unlock (bo); ret = bufmgr->backend->bo_unmap (bo); @@ -1230,6 +1231,8 @@ tbm_bo_unmap (tbm_bo bo) if (bo->map_cnt == 0) _tbm_bo_save_state (bo); + _tbm_bo_unlock (bo); + pthread_mutex_unlock (&bufmgr->lock); return ret; |