diff options
author | Ho-Eun Ryu <ho-eun.ryu@windriver.com> | 2009-12-30 09:47:50 +0900 |
---|---|---|
committer | Patrick Tjin <pattjin@google.com> | 2014-07-21 22:03:35 -0700 |
commit | ffb5cf6535c4e638cedd0117b5fc85195eb95e6b (patch) | |
tree | 688f80798adc0cec4071f1161defa9dda07bd7b7 /utils | |
parent | 3ca48681b349388346b10abce74c98497d231d04 (diff) | |
download | wrs_omxil_core-ffb5cf6535c4e638cedd0117b5fc85195eb95e6b.tar.gz |
utils:thread: create threads with DETACHED attribute
Diffstat (limited to 'utils')
-rw-r--r-- | utils/src/thread.cpp | 7 |
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; } |