From b339b5cf330cb4ca880a204389b851a7d23f99a6 Mon Sep 17 00:00:00 2001 From: Meco Man <920369182@qq.com> Date: Tue, 3 Aug 2021 10:55:16 +0800 Subject: [PATCH] =?UTF-8?q?[src][Kconfig]=20=E5=A2=9E=E5=8A=A0=E9=9A=90?= =?UTF-8?q?=E6=80=A7RT=5FUSING=5FASM=5FMEMCPY=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Kconfig | 4 ++++ src/kservice.c | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Kconfig b/src/Kconfig index a987daab46..71abd9cf4f 100644 --- a/src/Kconfig +++ b/src/Kconfig @@ -131,6 +131,10 @@ config RT_KSERVICE_USING_TINY_SIZE bool "Enable kservice to use tiny size" default n +config RT_USING_ASM_MEMCPY + bool + default n + endmenu menuconfig RT_DEBUG diff --git a/src/kservice.c b/src/kservice.c index 128a9f4f54..91872492fb 100644 --- a/src/kservice.c +++ b/src/kservice.c @@ -198,6 +198,7 @@ RT_WEAK void *rt_memset(void *s, int c, rt_ubase_t count) } RTM_EXPORT(rt_memset); +#ifndef RT_USING_ASM_MEMCPY /** * This function will copy memory content from source address to destination * address. @@ -208,7 +209,7 @@ RTM_EXPORT(rt_memset); * * @return the address of destination memory */ -RT_WEAK void *rt_memcpy(void *dst, const void *src, rt_ubase_t count) +void *rt_memcpy(void *dst, const void *src, rt_ubase_t count) { #ifdef RT_KSERVICE_USING_TINY_SIZE char *tmp = (char *)dst, *s = (char *)src; @@ -280,6 +281,7 @@ RT_WEAK void *rt_memcpy(void *dst, const void *src, rt_ubase_t count) #endif /* RT_KSERVICE_USING_TINY_SIZE */ } RTM_EXPORT(rt_memcpy); +#endif /* RT_USING_ASM_MEMCPY */ #ifndef RT_KSERVICE_USING_STDLIB