fix thread storage
This commit is contained in:
parent
adf513fc17
commit
835268c326
@ -21,6 +21,7 @@
|
|||||||
#include "nvs.h"
|
#include "nvs.h"
|
||||||
#include "esp_partition.h"
|
#include "esp_partition.h"
|
||||||
#include "esp_log.h"
|
#include "esp_log.h"
|
||||||
|
#include "pthread.h"
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
|
||||||
//Undocumented!!! Get chip temperature in Farenheit
|
//Undocumented!!! Get chip temperature in Farenheit
|
||||||
@ -40,7 +41,7 @@ void yield()
|
|||||||
portMUX_TYPE microsMux = portMUX_INITIALIZER_UNLOCKED;
|
portMUX_TYPE microsMux = portMUX_INITIALIZER_UNLOCKED;
|
||||||
static pthread_key_t microsStore=NULL; // Thread Local Storage Handle
|
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);
|
if(storage) free(storage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user