From b16d625a7589829e1ba9a088df188cab05604e70 Mon Sep 17 00:00:00 2001 From: Junkyeong Kim Date: Thu, 27 Apr 2023 19:30:09 +0900 Subject: [PATCH] screenmirror : Set screenmirror thread name Change-Id: Id7fe72386707983c37abad1097661433cefca0f7 Signed-off-by: Junkyeong Kim --- src/efl_util.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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(); -- 2.7.4