diff options
| author | Ritu Srivastava <rsrivast@sta.samsung.com> | 2011-01-25 16:23:08 -0800 |
|---|---|---|
| committer | Alex Ray <aray@google.com> | 2013-07-30 13:56:55 -0700 |
| commit | 741cbc33820cb7c8891f3ed0eae820ec447e298d (patch) | |
| tree | a4f8424cfc6857217d01a51b3ab46f237bedad45 /libs/utils | |
| parent | a25d2caf15c8f75f94f49807e749cde298b7f631 (diff) | |
| download | system_core-741cbc33820cb7c8891f3ed0eae820ec447e298d.zip system_core-741cbc33820cb7c8891f3ed0eae820ec447e298d.tar.gz system_core-741cbc33820cb7c8891f3ed0eae820ec447e298d.tar.bz2 | |
fix failing thread object run
A previously exited Thread object refuses to run again, if the
thread-id of the caller, conincides with the thread-id it previously
used in the worker thread. Hence reset the previously used worker
thread-id to -1 when it exits.
Signed-off-by: Ritu Srivastava <rsrivast@sta.samsung.com>
Change-Id: I873925c312a43ec8a16392b98cc959042ff6bfd2
Signed-off-by: Madan Ankapura <mankapur@sta.samsung.com>
Diffstat (limited to 'libs/utils')
| -rw-r--r-- | libs/utils/Threads.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libs/utils/Threads.cpp b/libs/utils/Threads.cpp index ad9a94f..b1bd828 100644 --- a/libs/utils/Threads.cpp +++ b/libs/utils/Threads.cpp @@ -778,6 +778,7 @@ int Thread::_threadLoop(void* user) // called by a new thread using the same thread ID as this one. self->mThread = thread_id_t(-1); self->mThreadExitedCondition.broadcast(); + self->mThread = thread_id_t(-1); // thread id could be reused self->mLock.unlock(); break; } |
