1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-28 07:03:00 +08:00

feat(nuttx_image_cache): add tid for cache name (#6434)

Co-authored-by: apple <apple@appledeMacBook-Air.local>
This commit is contained in:
Benign X 2024-06-28 02:22:02 +08:00 committed by GitHub
parent 376cc77f9e
commit 94d48feb22
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -32,6 +32,8 @@ typedef struct {
uint8_t * mem; uint8_t * mem;
uint32_t mem_size; uint32_t mem_size;
char name[sizeof(HEAP_NAME) + 10]; /**< +10 characters to store task pid. */
struct mm_heap_s * heap; struct mm_heap_s * heap;
uint32_t heap_size; uint32_t heap_size;
@ -106,8 +108,10 @@ static bool defer_init(void)
return false; return false;
} }
lv_snprintf(ctx->name, sizeof(ctx->name), HEAP_NAME "[%-4" LV_PRIu32 "]", (uint32_t)gettid());
ctx->heap = mm_initialize( ctx->heap = mm_initialize(
HEAP_NAME, ctx->name,
ctx->mem, ctx->mem,
ctx->mem_size ctx->mem_size
); );