mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-23 17:17:14 +00:00
refactor(pthread): decouple pthread_init from esp_system
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/task.h"
|
||||
#include "freertos/semphr.h"
|
||||
#include "esp_private/startup_internal.h"
|
||||
#if CONFIG_SPIRAM
|
||||
#include "esp_private/freertos_idf_additions_priv.h"
|
||||
#endif
|
||||
@@ -71,6 +72,11 @@ static void esp_pthread_cfg_key_destructor(void *value)
|
||||
free(value);
|
||||
}
|
||||
|
||||
ESP_SYSTEM_INIT_FN(init_pthread, CORE, BIT(0), 120)
|
||||
{
|
||||
return esp_pthread_init();
|
||||
}
|
||||
|
||||
esp_err_t esp_pthread_init(void)
|
||||
{
|
||||
if (pthread_key_create(&s_pthread_cfg_key, esp_pthread_cfg_key_destructor) != 0) {
|
||||
|
Reference in New Issue
Block a user