Add mutex for thread safety of app_data access 57/260957/1
authorSuyeon Hwang <stom.hwang@samsung.com>
Wed, 7 Jul 2021 10:37:46 +0000 (19:37 +0900)
committerSuyeon Hwang <stom.hwang@samsung.com>
Wed, 7 Jul 2021 11:13:30 +0000 (20:13 +0900)
commitbfc575c4ebc29da8ff0fe5cf69cb645dd2d64d4e
tree88a4cc832de401bc171022b3aef26841a19cee5d
parentf6fbcf146f838732de317461995f79bd3e6d3a12
Add mutex for thread safety of app_data access

app_data can be handled by main thread and sub thread for text playing.
Previous code guarantees the thread safety of sound data and speak data.
However, these are members of app data and thread safety of app data is not guaranteed.

This patch make mutex for app data access and unifies the mutex g_speak_data_mutex and
g_sound_data_mutex. These mutex are covered by new mutex for app data, because the data
covered by previous mutexs are member of app data.
So, if app wants to access those data, it should access app data first.

Change-Id: Ifb42b4e4751c32e3d8f786f79ffc3871b3c273e7
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
server/ttsd_data.cpp