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

Function _lwp_map_user

components/lwp/lwp_user_mm.c:187–208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

185}
186
187static void *_lwp_map_user(struct rt_lwp *lwp, void *map_va, size_t map_size,
188 int text)
189{
190 void *va = map_va;
191 int ret = 0;
192 rt_size_t flags = MMF_PREFETCH;
193
194 if (text)
195 flags |= MMF_TEXT;
196 if (va != RT_NULL)
197 flags |= MMF_MAP_FIXED;
198
199 ret = rt_aspace_map_private(lwp->aspace, &va, map_size, MMU_MAP_U_RWCB, flags);
200 if (ret != RT_EOK)
201 {
202 va = RT_NULL;
203 LOG_I("lwp_map_user: failed to map %lx with size %lx with errno %d", map_va,
204 map_size, ret);
205 }
206
207 return va;
208}
209
210int lwp_unmap_user(struct rt_lwp *lwp, void *va)
211{

Callers 1

lwp_map_userFunction · 0.85

Calls 1

rt_aspace_map_privateFunction · 0.85

Tested by

no test coverage detected