Nfc: replace cmsis thread with furi, fix condition race in thread stop routine. (#1003)

* Nfc: replace cmsis thread with furi, fix condition race on thread stop routine.
* Nfc: fix memory leak
* FuriCore, CMSIS: properly handle thread names before scheduler start
This commit is contained in:
あく
2022-02-19 02:38:44 +03:00
committed by GitHub
parent ddd909faa0
commit 3c77ae2eb8
4 changed files with 25 additions and 9 deletions

View File

@@ -288,6 +288,9 @@ static void print_heap_init() {
static void print_heap_malloc(void* ptr, size_t size) {
char tmp_str[33];
const char* name = osThreadGetName(osThreadGetId());
if(!name) {
name = "";
}
// {thread name|m|address|size}
FURI_CRITICAL_ENTER();
@@ -306,6 +309,9 @@ static void print_heap_malloc(void* ptr, size_t size) {
static void print_heap_free(void* ptr) {
char tmp_str[33];
const char* name = osThreadGetName(osThreadGetId());
if(!name) {
name = "";
}
// {thread name|f|address}
FURI_CRITICAL_ENTER();