mirror of
https://github.com/apache/nuttx.git
synced 2026-05-29 20:56:47 +08:00
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:
@@ -311,9 +311,10 @@ static int rptun_init_carveout(FAR struct rptun_priv_s *priv,
|
||||
|
||||
carveout->base = shmbase;
|
||||
carveout->size = shmlen;
|
||||
carveout->heap = mm_initialize(shmname, shmbase, shmlen);
|
||||
carveout->heap = mm_initialize_heap(KRN_HEAP, shmname, shmbase, shmlen);
|
||||
if (carveout->heap == NULL)
|
||||
{
|
||||
rptunerr("ERROR: Failed to initialize heap\n");
|
||||
kmm_free(carveout);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user