When it updates g_config_info, it needs mutex lock for preventing the data race condition.
When it accesses g_app_list, it needs mutex lock for preventing the data race condition.
Change-Id: I7b094b377a81e1e4fa35bf6cf6332a6baef8f83e
cur = cur->next;
}
+ pthread_mutex_lock(&g_config_info_mutex);
g_config_info = temp;
+ pthread_mutex_unlock(&g_config_info_mutex);
g_config_doc = doc;
if (true == is_default_open) {
int ttsd_data_get_client_count()
{
+ lock_guard<mutex> lock(g_app_data_mutex);
int num_client = g_app_list.size();
SLOG(LOG_INFO, tts_tag(), "[DATA INFO] Number of clients(%d)", num_client);