{
TBM_RETURN_IF_FAIL(TBM_BUFMGR_IS_VALID(bufmgr));
- _tbm_bufmgr_mutex_lock();
pthread_mutex_lock(&gLock);
+ _tbm_bufmgr_mutex_lock();
_tbm_set_last_result(TBM_ERROR_NONE);
if (!gBufMgr) {
TBM_ERR("gBufmgr already destroy: bufmgr:%p\n", bufmgr);
- pthread_mutex_unlock(&gLock);
_tbm_bufmgr_mutex_unlock();
+ pthread_mutex_unlock(&gLock);
return;
}
bufmgr->ref_count--;
if (bufmgr->ref_count > 0) {
TBM_DBG("reduce a ref_count(%d) of tbm_bufmgr(%p)\n", bufmgr->ref_count, bufmgr);
- pthread_mutex_unlock(&gLock);
_tbm_bufmgr_mutex_unlock();
+ pthread_mutex_unlock(&gLock);
return;
}
free(bufmgr);
gBufMgr = NULL;
- pthread_mutex_unlock(&gLock);
_tbm_bufmgr_mutex_unlock();
+ pthread_mutex_unlock(&gLock);
}
unsigned int