Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2d9299b3 authored by Ritu Srivastava's avatar Ritu Srivastava Committed by Madan Ankapura
Browse files

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: default avatarRitu Srivastava <rsrivast@sta.samsung.com>

Change-Id: I873925c312a43ec8a16392b98cc959042ff6bfd2

Signed-off-by: default avatarMadan Ankapura <mankapur@sta.samsung.com>
parent e59e0309
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -775,6 +775,7 @@ int Thread::_threadLoop(void* user)
            self->mLock.lock();
            self->mRunning = false;
            self->mThreadExitedCondition.broadcast();
            self->mThread = thread_id_t(-1); // thread id could be reused
            self->mLock.unlock();
            break;
        }