bufmgr: lock/unlock gLock 93/173793/1
authorSooChan Lim <sc1.lim@samsung.com>
Mon, 26 Mar 2018 04:04:23 +0000 (13:04 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Mon, 26 Mar 2018 04:04:23 +0000 (13:04 +0900)
Change-Id: Iac73a706adb5bf5410fd42b974699691153b36d5

src/tbm_bufmgr.c

index 1e6b471..eaddfc0 100644 (file)
@@ -1077,7 +1077,9 @@ tbm_bufmgr_set_bo_lock_type(tbm_bufmgr bufmgr, tbm_bufmgr_bo_lock_type bo_lock_t
        TBM_BUFMGR_RETURN_VAL_IF_FAIL(TBM_BUFMGR_IS_VALID(gBufMgr), 0);
        TBM_BUFMGR_RETURN_VAL_IF_FAIL(bufmgr == gBufMgr, 0);
 
+       pthread_mutex_lock(&gLock);
        gBufMgr->bo_lock_type = bo_lock_type;
+       pthread_mutex_unlock(&gLock);
 
        TBM_INFO("The bo_lock_type of the bo is %d\n", bo_lock_type);