Make NS Consumer message handler thread as joinable thread. 41/212241/1
authorSenthil Kumar G S <senthil.gs@samsung.com>
Thu, 8 Aug 2019 15:09:23 +0000 (20:39 +0530)
committerSudipto <sudipto.bal@samsung.com>
Mon, 19 Aug 2019 07:50:52 +0000 (13:20 +0530)
commit240762162713cef7e9961b2136fc6560a77b222e
tree15ebde9edb27f825e8c8930555216e89521847d0
parentcb32b2c7eebd5807b081bb44acaa4d27e94dd5a9
Make NS Consumer message handler thread as joinable thread.

Background:
Currently, NS Consumer message handler thread is a detached thread.
When stopping NS Consumer, we have to destroy thread handle and other resources of message handler thread.
We cannot destroy if message handler thread is running.
So before we destroy, we need to wait for the message handler thread to terminate.
pthread_join() is called internally. As it is on a detached thread, it is useless and it could result in undefined behavior.

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/commit/93e66a00acc08ce0c7a3fb217bfb2cc92f2a6c15
(cherry-picked from 93e66a00acc08ce0c7a3fb217bfb2cc92f2a6c15)

Change-Id: I43113a1d6ac0dcbba15a6b12032d71c5369e8b3b
Signed-off-by: Senthil Kumar G S <senthil.gs@samsung.com>
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
service/notification/src/consumer/NSConsumerScheduler.c
service/notification/src/consumer/NSThread.c
service/notification/src/consumer/NSThread.h