From: Junkyeong Kim Date: Thu, 27 Apr 2023 10:30:09 +0000 (+0900) Subject: screenmirror : Set screenmirror thread name X-Git-Tag: accepted/tizen/unified/20230528.171004~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F26%2F292126%2F1;p=platform%2Fcore%2Fapi%2Fefl-util.git screenmirror : Set screenmirror thread name Change-Id: Id7fe72386707983c37abad1097661433cefca0f7 Signed-off-by: Junkyeong Kim --- diff --git a/src/efl_util.c b/src/efl_util.c index 6cb96d1..6eec154 100644 --- a/src/efl_util.c +++ b/src/efl_util.c @@ -14,6 +14,8 @@ * limitations under the License. */ +#define _GNU_SOURCE + #define LOG_TAG "TIZEN_N_EFL_UTIL" #include @@ -2428,7 +2430,13 @@ efl_util_screenmirror_start(efl_util_screenmirror_h screenmirror) ret = pthread_create(&screenmirror->thread, NULL, _efl_util_screenmirror_loop, screenmirror); if (ret < 0) - fprintf(stderr, "[screenmirror] fail: thread create fail\n"); + { + fprintf(stderr, "[screenmirror] fail: thread create fail\n"); + _screenshot_mutex_unlock(); + return EFL_UTIL_ERROR_SCREENSHOT_EXECUTION_FAIL; + } + + pthread_setname_np(screenmirror->thread, "e_util_mirror"); _screenshot_mutex_unlock();