drivers/rptun: move the heap out of the share memory

Because heap->lock will use atomic operation and may can't use in
share memory.

Signed-off-by: Bowen Wnag <wangbowen6@xiaomi.com>
This commit is contained in:
Bowen Wnag
2025-04-11 21:30:04 +08:00
committed by GUIDINGLI
parent 6ed4ea63d8
commit f456e0b637
+2 -1
View File
@@ -311,9 +311,10 @@ static int rptun_init_carveout(FAR struct rptun_priv_s *priv,
carveout->base = shmbase; carveout->base = shmbase;
carveout->size = shmlen; carveout->size = shmlen;
carveout->heap = mm_initialize(shmname, shmbase, shmlen); carveout->heap = mm_initialize_heap(KRN_HEAP, shmname, shmbase, shmlen);
if (carveout->heap == NULL) if (carveout->heap == NULL)
{ {
rptunerr("ERROR: Failed to initialize heap\n");
kmm_free(carveout); kmm_free(carveout);
return -ENOMEM; return -ENOMEM;
} }