AirPlay: no realloc, safe TCB cleanup, tools convergence

This commit is contained in:
Philippe G
2021-12-17 10:54:25 -08:00
parent a266c07114
commit 3b6299dc1a
14 changed files with 144 additions and 59 deletions

View File

@@ -48,6 +48,16 @@ void winsock_init(void);
void winsock_init(void);
void winsock_close(void);
#else
char *strlwr(char *str);
// reason is that TCB might be cleanup in idle task
#define SAFE_TCB_FREE(T) \
do { \
int priority = uxTaskPriorityGet(NULL); \
vTaskPrioritySet(NULL, tskIDLE_PRIORITY); \
vTaskDelay(1); \
vTaskPrioritySet(NULL, priority); \
heap_caps_free(T); \
} while (0)
#endif
@@ -67,5 +77,6 @@ char* kd_dump(key_data_t *kd);
char* http_send(int sock, char *method, key_data_t *rkd);
char* kd_lookup(key_data_t *kd, char *key);
bool kd_add(key_data_t *kd, char *key, char *value);
bool kd_add(key_data_t *kd, char *key, char *value);
char* kd_dump(key_data_t *kd);
void kd_free(key_data_t *kd);