X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=include%2Futil%2Fmtp_thread.h;h=f742158ad4c0094342c06c75bbc744c97f3bab00;hb=refs%2Ftags%2Faccepted%2Ftizen%2Fwearable%2F20170113.225406;hp=41c4cfe6adf21206254761c5e071ed489ea06969;hpb=6bc392414b5e28f85f8feabc2c5ec83bdb7fbfda;p=platform%2Fcore%2Fconnectivity%2Fmtp-responder.git diff --git a/include/util/mtp_thread.h b/include/util/mtp_thread.h index 41c4cfe..f742158 100755 --- a/include/util/mtp_thread.h +++ b/include/util/mtp_thread.h @@ -28,15 +28,15 @@ typedef void *(*thread_func_t) (void *pArg); int lock_ret = 0;\ DBG("Thread [%d] trying to lock the Mutex \n", syscall(__NR_gettid));\ lock_ret = pthread_mutex_lock(mut);\ - if(lock_ret != 0) {\ - if(lock_ret == EDEADLK) {\ + if (lock_ret != 0) {\ + if (lock_ret == EDEADLK) {\ DBG("Mutex is already locked by the same thread");\ } else {\ ERR("Error locking mutex. Error = %d \n", lock_ret);\ - }\ + } \ } else {\ DBG("Mutex locked by thread [%d] \n", syscall(__NR_gettid));\ - }\ + } \ } while (0);\ @@ -48,7 +48,7 @@ typedef void *(*thread_func_t) (void *pArg); ERR("Error unlocking mutex. Error = %d \n", unlock_ret);\ } else {\ DBG("Mutex unlocked by thread [%d] \n", syscall(__NR_gettid));\ - }\ + } \ } while (0);\ mtp_bool _util_thread_create(pthread_t *tid, const mtp_char *tname,