aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorHo-Eun Ryu <ho-eun.ryu@windriver.com>2009-12-30 09:47:50 +0900
committerPatrick Tjin <pattjin@google.com>2014-07-21 22:03:35 -0700
commitffb5cf6535c4e638cedd0117b5fc85195eb95e6b (patch)
tree688f80798adc0cec4071f1161defa9dda07bd7b7 /utils
parent3ca48681b349388346b10abce74c98497d231d04 (diff)
downloadwrs_omxil_core-ffb5cf6535c4e638cedd0117b5fc85195eb95e6b.tar.gz
utils:thread: create threads with DETACHED attribute
Diffstat (limited to 'utils')
-rw-r--r--utils/src/thread.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/utils/src/thread.cpp b/utils/src/thread.cpp
index bdaa773..226b765 100644
--- a/utils/src/thread.cpp
+++ b/utils/src/thread.cpp
@@ -38,7 +38,12 @@ int Thread::Start(void)
pthread_mutex_lock(&lock);
if (!created) {
- ret = pthread_create(&id, NULL, Instance, this);
+ pthread_attr_t attr;
+
+ pthread_attr_init(&attr);
+ pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
+
+ ret = pthread_create(&id, &attr, Instance, this);
if (!ret)
created = true;
}