projects
/
platform
/
core
/
system
/
pass.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ac7c1fc
)
util: thread: Fix to unlock mutex before doing job
64/270464/2
author
Dongwoo Lee
<dwoo08.lee@samsung.com>
Thu, 3 Feb 2022 06:30:36 +0000
(15:30 +0900)
committer
Dongwoo Lee
<dwoo08.lee@samsung.com>
Thu, 3 Feb 2022 06:30:36 +0000
(15:30 +0900)
Change-Id: I1af301998cdae5c92ffd249b9c61dfb9696e8677
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
src/util/thread.c
patch
|
blob
|
history
diff --git
a/src/util/thread.c
b/src/util/thread.c
index 50b1bc097ac1b41c74d8eb624f9cc122201c9e93..787c8e98754a5848e7f8a7f68473957b899bc82d 100644
(file)
--- a/
src/util/thread.c
+++ b/
src/util/thread.c
@@
-38,7
+38,9
@@
static void __thread_loop_main(void *_ctx)
if (ctx->state == THREAD_STATE_TERMINATED)
break;
+ mtx_unlock(&ctx->lock);
ret = ctx->func(ctx->arg, &result);
+ mtx_lock(&ctx->lock);
if (ret != THREAD_RETURN_CONTINUE) {
ctx->state = THREAD_STATE_TERMINATED;