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

Function rt_aspace_detach

components/mm/mm_aspace.c:105–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103}
104
105void rt_aspace_detach(rt_aspace_t aspace)
106{
107 rt_varea_t varea;
108
109 WR_LOCK(aspace);
110 varea = ASPACE_VAREA_FIRST(aspace);
111 while (varea)
112 {
113 rt_varea_t prev = varea;
114 varea = ASPACE_VAREA_NEXT(varea);
115
116 _varea_uninstall_locked(prev);
117 if (VAREA_NOT_STATIC(prev))
118 {
119 rt_free(prev);
120 }
121 }
122 WR_UNLOCK(aspace);
123
124 rt_aspace_anon_ref_dec(aspace->private_object);
125
126 rt_mutex_detach(&aspace->bst_lock);
127}
128
129void rt_aspace_delete(rt_aspace_t aspace)
130{

Callers 1

rt_aspace_deleteFunction · 0.85

Calls 4

_varea_uninstall_lockedFunction · 0.85
rt_freeFunction · 0.85
rt_aspace_anon_ref_decFunction · 0.85
rt_mutex_detachFunction · 0.85

Tested by

no test coverage detected