tbm_last_error = err;
}
+/* LCOV_EXCL_START */
static void
_tbm_util_get_appname_brief(char *brief)
{
snprintf(str, sizeof(cmdline), "%s", cmdline);
}
+/* LCOV_EXCL_STOP */
tbm_user_data
*user_data_lookup(struct list_head *user_data_list, unsigned long key)
tbm_bufmgr bufmgr = bo->bufmgr;
int ret = 0;
- if (bufmgr->backend->bo_lock) {
+ if (bufmgr->backend->bo_lock)
ret = bufmgr->backend->bo_lock(bo, device, opt);
- } else {
+ else
ret = 1;
- }
return ret;
}
{
tbm_bufmgr bufmgr = bo->bufmgr;
- if (bufmgr->backend->bo_unlock) {
+ if (bufmgr->backend->bo_unlock)
bufmgr->backend->bo_unlock(bo);
- }
}
static int
}
+/* LCOV_EXCL_START */
static int
_check_version(TBMModuleVersionInfo *data)
{
return ret;
}
+/* LCOV_EXCL_STOP */
tbm_bufmgr
tbm_bufmgr_init(int fd)
pthread_mutex_lock(&gLock);
+ /* LCOV_EXCL_START */
#ifdef HAVE_DLOG
env = getenv("TBM_DLOG");
if (env) {
bDebug = 0;
}
#endif
+ /* LCOV_EXCL_STOP */
/* initialize buffer manager */
if (gBufMgr) {
/* load bufmgr priv from env */
if (!_tbm_load_module(gBufMgr, gBufMgr->fd)) {
+ /* LCOV_EXCL_START */
_tbm_set_last_result(TBM_BO_ERROR_LOAD_MODULE_FAILED);
TBM_LOG_E("error : Fail to load bufmgr backend\n");
gBufMgr = NULL;
pthread_mutex_unlock(&gLock);
return NULL;
+ /* LCOV_EXCL_STOP */
}
/* log for tbm backend_flag */
gBufMgr, gBufMgr->ref_count);
if (pthread_mutex_init(&gBufMgr->lock, NULL) != 0) {
+ /* LCOV_EXCL_START */
_tbm_set_last_result(TBM_BO_ERROR_THREAD_INIT_FAILED);
gBufMgr->backend->bufmgr_deinit(gBufMgr->backend->priv);
tbm_backend_free(gBufMgr->backend);
gBufMgr = NULL;
pthread_mutex_unlock(&gLock);
return NULL;
+ /* LCOV_EXCL_STOP */
}
/* setup the lock_type */
pthread_mutex_lock(&gLock);
+ if (!gBufMgr) {
+ TBM_LOG_E("gBufmgr already destroy: bufmgr:%p\n", bufmgr);
+ pthread_mutex_unlock(&gLock);
+ return;
+ }
+
bufmgr->ref_count--;
if (bufmgr->ref_count > 0) {
DBG("tizen bufmgr destroy: bufmgr:%p, ref_count:%d\n",
return 1;
}
-tbm_error_e
-tbm_get_last_error(void)
-{
- return tbm_last_error;
-}
-
unsigned int
tbm_bufmgr_get_capability(tbm_bufmgr bufmgr)
{
return bo->flags;
}
+/* LCOV_EXCL_START */
+tbm_error_e
+tbm_get_last_error(void)
+{
+ return tbm_last_error;
+}
+
void
tbm_bufmgr_debug_show(tbm_bufmgr bufmgr)
{
return 1;
}
-
+/* LCOV_EXCL_STOP */