diff options
author | Ho-Eun Ryu <ho-eun.ryu@windriver.com> | 2009-09-25 14:30:46 +0900 |
---|---|---|
committer | Patrick Tjin <pattjin@google.com> | 2014-07-21 22:03:24 -0700 |
commit | ba4014339471126ca90af5a5ec7a1ee10ad6c15b (patch) | |
tree | f513f38d1be89ddf0a2512d9b53219e1bcf6432e /utils | |
parent | 890904549b98adbf1b45b8c6a4aa64cb0ac93531 (diff) | |
download | wrs_omxil_core-ba4014339471126ca90af5a5ec7a1ee10ad6c15b.tar.gz |
utils:thread: fix bug with thread id handling
Diffstat (limited to 'utils')
-rw-r--r-- | utils/src/thread.cpp | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/utils/src/thread.cpp b/utils/src/thread.cpp index d0e0e06..9b096c4 100644 --- a/utils/src/thread.cpp +++ b/utils/src/thread.cpp @@ -4,30 +4,21 @@ Thread::Thread() { r = NULL; - id = -1; } Thread::Thread(RunnableInterface *r) { this->r = r; - id = -1; } Thread::~Thread() { - if (id > 0) - Join(); + Join(); } int Thread::Start(void) { - int ret; - - ret = pthread_create(&id, NULL, Instance, this); - if (ret) - id = -1; - - return ret; + return pthread_create(&id, NULL, Instance, this); } int Thread::Join(void) |