| 316 | } |
| 317 | |
| 318 | static 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 | |
| 337 | static int _lwp_shm_ref_inc(struct rt_lwp *lwp, void *shm_vaddr) |
| 338 | { |
no test coverage detected