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

Function _lwp_shm_struct_get

components/lwp/lwp_shm.c:318–335  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

316}
317
318static struct lwp_shm_struct *_lwp_shm_struct_get(struct rt_lwp *lwp, void *shm_vaddr)
319{
320 void *pa = RT_NULL;
321 struct lwp_avl_struct *node_pa = RT_NULL;
322
323 if (!lwp)
324 {
325 return RT_NULL;
326 }
327 pa = lwp_v2p(lwp, shm_vaddr); /* physical memory */
328
329 node_pa = lwp_avl_find((size_t)pa, shm_tree_pa);
330 if (!node_pa)
331 {
332 return RT_NULL;
333 }
334 return (struct lwp_shm_struct *)node_pa->data;
335}
336
337static int _lwp_shm_ref_inc(struct rt_lwp *lwp, void *shm_vaddr)
338{

Callers 2

_lwp_shm_ref_incFunction · 0.85
_lwp_shm_ref_decFunction · 0.85

Calls 2

lwp_v2pFunction · 0.85
lwp_avl_findFunction · 0.85

Tested by

no test coverage detected