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

Function lwp_put_to_user

components/lwp/lwp_user_mm.c:703–728  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

701}
702
703size_t lwp_put_to_user(void *dst, void *src, size_t size)
704{
705 struct rt_lwp *lwp = RT_NULL;
706
707 /* check dst */
708 if (dst < (void *)USER_VADDR_START)
709 {
710 return 0;
711 }
712 if (dst >= (void *)USER_VADDR_TOP)
713 {
714 return 0;
715 }
716 if ((void *)((char *)dst + size) > (void *)USER_VADDR_TOP)
717 {
718 return 0;
719 }
720
721 lwp = lwp_self();
722 if (!lwp)
723 {
724 return 0;
725 }
726
727 return lwp_data_put(lwp, dst, src, size);
728}
729
730rt_inline rt_bool_t _can_unaligned_access(const char *addr)
731{

Callers 15

_clear_child_tidFunction · 0.85
lwp_memcpyFunction · 0.85
sys_readFunction · 0.85
sys_fstatFunction · 0.85
sys_pollFunction · 0.85
sys_selectFunction · 0.85
sys_nanosleepFunction · 0.85
sys_gettimeofdayFunction · 0.85
sys_event_recvFunction · 0.85
sys_mb_recvFunction · 0.85
sys_syslogFunction · 0.85
sys_mq_recvFunction · 0.85

Calls 2

lwp_selfFunction · 0.85
lwp_data_putFunction · 0.85

Tested by

no test coverage detected