projects
/
platform
/
adaptation
/
npu
/
trix-engine.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2aa8914
)
Add lock_guard in callbackSync::callback to prevent deadlock
author
Dongjin Na
<dongjin.na@samsung.com>
Thu, 15 Dec 2022 03:41:36 +0000
(12:41 +0900)
committer
추지호/NPU Lab(SR)/삼성전자
<jiho.chu@samsung.com>
Fri, 23 Dec 2022 06:59:33 +0000
(15:59 +0900)
This patch fixes a deadlock issue of NPU_INFER_BLOCKING mode.
Signed-off-by: Dongjin Na <dongjin.na@samsung.com>
src/core/ne-handler.cc
patch
|
blob
|
history
diff --git
a/src/core/ne-handler.cc
b/src/core/ne-handler.cc
index 0516404edb3c93f83f9fbff83a038a6e54fa1909..34eca91f5fb76da413339852005b813510104fcb 100644
(file)
--- a/
src/core/ne-handler.cc
+++ b/
src/core/ne-handler.cc
@@
-302,7
+302,10
@@
class callbackSync {
}
void callback (output_buffers *output, int req_id) {
- done_ = true;
+ {
+ std::lock_guard<std::mutex> lock (m_);
+ done_ = true;
+ }
cv_.notify_one ();
}