MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / _unmap_range_locked

Function _unmap_range_locked

components/mm/mm_aspace.c:1012–1033  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1010}
1011
1012static int _unmap_range_locked(rt_aspace_t aspace, void *addr, size_t length)
1013{
1014 int error = RT_EOK;
1015 rt_varea_t existed;
1016 struct _mm_range unmap_range;
1017
1018 unmap_range.start = addr;
1019 unmap_range.end = addr + length - 1;
1020
1021 existed = _aspace_bst_search_overlap(aspace, unmap_range);
1022 while (existed)
1023 {
1024 error = _remove_overlapped_varea(existed, addr, length);
1025
1026 if (error == RT_EOK)
1027 existed = _aspace_bst_search_overlap(aspace, unmap_range);
1028 else
1029 break;
1030 }
1031
1032 return error;
1033}
1034
1035int rt_aspace_unmap_range(rt_aspace_t aspace, void *addr, size_t length)
1036{

Callers 2

_varea_installFunction · 0.85
rt_aspace_unmap_rangeFunction · 0.85

Calls 2

_remove_overlapped_vareaFunction · 0.85

Tested by

no test coverage detected