[src][Kconfig] 增加隐性RT_USING_ASM_MEMCPY定义

This commit is contained in:
Meco Man 2021-08-03 10:55:16 +08:00
parent 396297a993
commit b339b5cf33
2 changed files with 7 additions and 1 deletions

View File

@ -131,6 +131,10 @@ config RT_KSERVICE_USING_TINY_SIZE
bool "Enable kservice to use tiny size" bool "Enable kservice to use tiny size"
default n default n
config RT_USING_ASM_MEMCPY
bool
default n
endmenu endmenu
menuconfig RT_DEBUG menuconfig RT_DEBUG

View File

@ -198,6 +198,7 @@ RT_WEAK void *rt_memset(void *s, int c, rt_ubase_t count)
} }
RTM_EXPORT(rt_memset); RTM_EXPORT(rt_memset);
#ifndef RT_USING_ASM_MEMCPY
/** /**
* This function will copy memory content from source address to destination * This function will copy memory content from source address to destination
* address. * address.
@ -208,7 +209,7 @@ RTM_EXPORT(rt_memset);
* *
* @return the address of destination memory * @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 #ifdef RT_KSERVICE_USING_TINY_SIZE
char *tmp = (char *)dst, *s = (char *)src; 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 */ #endif /* RT_KSERVICE_USING_TINY_SIZE */
} }
RTM_EXPORT(rt_memcpy); RTM_EXPORT(rt_memcpy);
#endif /* RT_USING_ASM_MEMCPY */
#ifndef RT_KSERVICE_USING_STDLIB #ifndef RT_KSERVICE_USING_STDLIB