From 835268c326e0a6c95a36e66f5b6a6d24c2c51f8f Mon Sep 17 00:00:00 2001 From: me-no-dev Date: Sun, 4 Mar 2018 21:23:18 +0100 Subject: [PATCH] fix thread storage --- cores/esp32/esp32-hal-misc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cores/esp32/esp32-hal-misc.c b/cores/esp32/esp32-hal-misc.c index 7c1e517f..7c87310e 100644 --- a/cores/esp32/esp32-hal-misc.c +++ b/cores/esp32/esp32-hal-misc.c @@ -21,6 +21,7 @@ #include "nvs.h" #include "esp_partition.h" #include "esp_log.h" +#include "pthread.h" #include //Undocumented!!! Get chip temperature in Farenheit @@ -40,7 +41,7 @@ void yield() portMUX_TYPE microsMux = portMUX_INITIALIZER_UNLOCKED; static pthread_key_t microsStore=NULL; // Thread Local Storage Handle -void* microsStoreDelete(void * storage) { // release thread local data when task is delete. +void microsStoreDelete(void * storage) { // release thread local data when task is delete. if(storage) free(storage); }