projects
/
platform
/
core
/
uifw
/
libtpl-egl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7831663
)
Add missing Lock
63/305263/4
author
jphnix
<jphnix99@gmail.com>
Tue, 30 Jan 2024 10:33:55 +0000
(10:33 +0000)
committer
Jinbong Lee
<jinbong.lee@samsung.com>
Wed, 31 Jan 2024 09:01:22 +0000
(09:01 +0000)
- gthread->loop is held with thread_mutex.
- But it doesn't hold thread_mutex in tpl_gthread_add_idle
Change-Id: Ibaddbcf7e4d4b9ec661ee69c0a95dbc517970ea2
src/tpl_utils_gthread.c
patch
|
blob
|
history
diff --git
a/src/tpl_utils_gthread.c
b/src/tpl_utils_gthread.c
index
54cd2b6
..
466baef
100644
(file)
--- a/
src/tpl_utils_gthread.c
+++ b/
src/tpl_utils_gthread.c
@@
-627,7
+627,10
@@
tpl_gthread_add_idle(tpl_gthread *gthread, tpl_gsource_func idle_cb, void *data)
g_source_set_callback(idle_source,
idle_cb, (gpointer)data,
NULL);
+
+ g_mutex_lock(>hread->thread_mutex);
g_source_attach(idle_source, g_main_loop_get_context(gthread->loop));
+ g_mutex_unlock(>hread->thread_mutex);
g_source_unref(idle_source);
return TPL_ERROR_NONE;