Set explicit names for streaming threads 38/304838/1
authorJi-hoon Lee <dalton.lee@samsung.com>
Wed, 5 Apr 2023 04:49:32 +0000 (13:49 +0900)
committerJi-hoon Lee <dalton.lee@samsung.com>
Wed, 24 Jan 2024 07:31:23 +0000 (16:31 +0900)
Change-Id: I1fd74038cc50155093292d5221c9cafac7b8c5bc

wakeup-manager/src/wakeup_audio_manager.cpp
wakeup-manager/src/wakeup_engine_manager.cpp

index 8bab1d6..1fd7761 100644 (file)
@@ -254,6 +254,10 @@ void CAudioManager::streaming_audio_data_thread_func(long long start_time)
 {
        MWR_LOGI("[ENTER]");
 
+       pthread_t thread = pthread_self();
+       int name_set_result = pthread_setname_np(thread, "audio-manager");
+       MWR_LOGE("Name : %d %lu", name_set_result, thread);
+
        mStreamingThreadActive.store(true);
 
        unique_lock<mutex> lock(mMutex, defer_lock);
index cb0c0b7..b2c92b5 100644 (file)
@@ -289,6 +289,10 @@ void CWakeupEngineManager::streaming_speech_data_thread_func()
 {
        MWR_LOGE("[ENTER]");
 
+       pthread_t thread = pthread_self();
+       int name_set_result = pthread_setname_np(thread, "engine-manager");
+       MWR_LOGE("Name : %d %lu", name_set_result, thread);
+
        if (nullptr == mSelectedEngine) {
                MWR_LOGE("No Engine Selected");
                return;