Skip to content

Commit b339b5c

Browse files
committed
[src][Kconfig] 增加隐性RT_USING_ASM_MEMCPY定义
1 parent 396297a commit b339b5c

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/Kconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,10 @@ config RT_KSERVICE_USING_TINY_SIZE
131131
bool "Enable kservice to use tiny size"
132132
default n
133133

134+
config RT_USING_ASM_MEMCPY
135+
bool
136+
default n
137+
134138
endmenu
135139

136140
menuconfig RT_DEBUG

src/kservice.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ RT_WEAK void *rt_memset(void *s, int c, rt_ubase_t count)
198198
}
199199
RTM_EXPORT(rt_memset);
200200

201+
#ifndef RT_USING_ASM_MEMCPY
201202
/**
202203
* This function will copy memory content from source address to destination
203204
* address.
@@ -208,7 +209,7 @@ RTM_EXPORT(rt_memset);
208209
*
209210
* @return the address of destination memory
210211
*/
211-
RT_WEAK void *rt_memcpy(void *dst, const void *src, rt_ubase_t count)
212+
void *rt_memcpy(void *dst, const void *src, rt_ubase_t count)
212213
{
213214
#ifdef RT_KSERVICE_USING_TINY_SIZE
214215
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)
280281
#endif /* RT_KSERVICE_USING_TINY_SIZE */
281282
}
282283
RTM_EXPORT(rt_memcpy);
284+
#endif /* RT_USING_ASM_MEMCPY */
283285

284286
#ifndef RT_KSERVICE_USING_STDLIB
285287

0 commit comments

Comments
 (0)