Skip to content

Commit b352981

Browse files
committed
dml: Create getSyscfgLogLevel thread in detached state
Create thread in detached state to avoid neccesity to free its resources after exit. Signed-off-by: Luke Dalek <[email protected]>
1 parent 0ff4e43 commit b352981

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

source/dml/wifi_ssp/ssp_main.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,11 @@ wifi_util_dbg_print(WIFI_MGR,"%s:%d: RDK_LOGGER_INIT done!\n", __func__, __LINE_
620620
/* For XB3, there are 4 rpc calls to arm to get loglevel values from syscfg
621621
* this takes around 7 to 10 seconds, so we are moving this to a thread */
622622
pthread_t updateSyscfgLogLevel;
623-
pthread_create(&updateSyscfgLogLevel, NULL, &getSyscfgLogLevel, NULL);
623+
pthread_attr_t updateSyscfgLogLevelAttr;
624+
pthread_attr_init(&updateSyscfgLogLevelAttr);
625+
pthread_attr_setdetachstate(&updateSyscfgLogLevelAttr, PTHREAD_CREATE_DETACHED);
626+
pthread_create(&updateSyscfgLogLevel, &updateSyscfgLogLevelAttr, &getSyscfgLogLevel, NULL);
627+
pthread_attr_destroy(&updateSyscfgLogLevelAttr);
624628

625629
#ifdef _COSA_SIM_
626630
subSys = ""; /* PC simu use empty string as subsystem */

0 commit comments

Comments
 (0)