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

Function lwp_get_from_user

components/lwp/lwp_user_mm.c:675–701  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

673}
674
675size_t lwp_get_from_user(void *dst, void *src, size_t size)
676{
677 struct rt_lwp *lwp = RT_NULL;
678
679 /* check src */
680
681 if (src < (void *)USER_VADDR_START)
682 {
683 return 0;
684 }
685 if (src >= (void *)USER_VADDR_TOP)
686 {
687 return 0;
688 }
689 if ((void *)((char *)src + size) > (void *)USER_VADDR_TOP)
690 {
691 return 0;
692 }
693
694 lwp = lwp_self();
695 if (!lwp)
696 {
697 return 0;
698 }
699
700 return lwp_data_get(lwp, dst, src, size);
701}
702
703size_t lwp_put_to_user(void *dst, void *src, size_t size)
704{

Callers 15

args_appendFunction · 0.85
lwp_args_putFunction · 0.85
_futex_lock_piFunction · 0.85
_fetch_robust_entryFunction · 0.85
_handle_futex_deathFunction · 0.85
lwp_memcpyFunction · 0.85
sys_writeFunction · 0.85
sys_openFunction · 0.85
sys_openatFunction · 0.85
sys_pollFunction · 0.85
sys_selectFunction · 0.85

Calls 2

lwp_selfFunction · 0.85
lwp_data_getFunction · 0.85

Tested by

no test coverage detected