summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorguo <[email protected]>2021-12-22 09:38:27 +0800
committerGitHub <[email protected]>2021-12-22 09:38:27 +0800
commitf20eef99db5ef5a499e4af71275a73a7eedcca41 (patch)
treee397f19c5abec9efeb625700f8933d502c877afc
parent3b861541e242be96723a6fd8b2b3c50463d6bd9c (diff)
parent093b9700c8b8247a2b165b1171d91e79b9fe1b47 (diff)
Merge pull request #5401 from mysterywolf/lwip
[kservice] remove RT_USING_ASM_MEMCPY RT_USING_ASM_MEMSET
-rw-r--r--components/net/lwip-1.4.1/src/lwipopts.h4
-rw-r--r--components/net/lwip-2.0.2/src/lwipopts.h4
-rw-r--r--components/net/lwip-2.0.3/src/lwipopts.h4
-rw-r--r--components/net/lwip-2.1.2/src/lwipopts.h4
-rw-r--r--src/Kconfig8
-rw-r--r--src/kservice.c8
6 files changed, 2 insertions, 30 deletions
diff --git a/components/net/lwip-1.4.1/src/lwipopts.h b/components/net/lwip-1.4.1/src/lwipopts.h
index 312f4f83ec..d7a6807cbd 100644
--- a/components/net/lwip-1.4.1/src/lwipopts.h
+++ b/components/net/lwip-1.4.1/src/lwipopts.h
@@ -218,11 +218,7 @@
#define LWIP_DBG_TYPES_ON (LWIP_DBG_ON|LWIP_DBG_TRACE|LWIP_DBG_STATE|LWIP_DBG_FRESH|LWIP_DBG_HALT)
/* ---------- Memory options ---------- */
-#ifdef RT_USING_ASM_MEMCPY
#define MEMCPY(dst,src,len) rt_memcpy(dst,src,len)
-#else
-#define MEMCPY(dst,src,len) memcpy(dst,src,len)
-#endif /* RT_USING_ASM_MEMCPY */
#define SMEMCPY(dst,src,len) MEMCPY(dst,src,len)
#define MEM_ALIGNMENT 4
diff --git a/components/net/lwip-2.0.2/src/lwipopts.h b/components/net/lwip-2.0.2/src/lwipopts.h
index 9f5d03ebf7..5c99013d2e 100644
--- a/components/net/lwip-2.0.2/src/lwipopts.h
+++ b/components/net/lwip-2.0.2/src/lwipopts.h
@@ -226,11 +226,7 @@
#define LWIP_DBG_TYPES_ON (LWIP_DBG_ON|LWIP_DBG_TRACE|LWIP_DBG_STATE|LWIP_DBG_FRESH|LWIP_DBG_HALT)
/* ---------- Memory options ---------- */
-#ifdef RT_USING_ASM_MEMCPY
#define MEMCPY(dst,src,len) rt_memcpy(dst,src,len)
-#else
-#define MEMCPY(dst,src,len) memcpy(dst,src,len)
-#endif /* RT_USING_ASM_MEMCPY */
#define SMEMCPY(dst,src,len) MEMCPY(dst,src,len)
#ifdef RT_LWIP_MEM_ALIGNMENT
diff --git a/components/net/lwip-2.0.3/src/lwipopts.h b/components/net/lwip-2.0.3/src/lwipopts.h
index 9f5d03ebf7..5c99013d2e 100644
--- a/components/net/lwip-2.0.3/src/lwipopts.h
+++ b/components/net/lwip-2.0.3/src/lwipopts.h
@@ -226,11 +226,7 @@
#define LWIP_DBG_TYPES_ON (LWIP_DBG_ON|LWIP_DBG_TRACE|LWIP_DBG_STATE|LWIP_DBG_FRESH|LWIP_DBG_HALT)
/* ---------- Memory options ---------- */
-#ifdef RT_USING_ASM_MEMCPY
#define MEMCPY(dst,src,len) rt_memcpy(dst,src,len)
-#else
-#define MEMCPY(dst,src,len) memcpy(dst,src,len)
-#endif /* RT_USING_ASM_MEMCPY */
#define SMEMCPY(dst,src,len) MEMCPY(dst,src,len)
#ifdef RT_LWIP_MEM_ALIGNMENT
diff --git a/components/net/lwip-2.1.2/src/lwipopts.h b/components/net/lwip-2.1.2/src/lwipopts.h
index f5eb177d5d..95e88961d2 100644
--- a/components/net/lwip-2.1.2/src/lwipopts.h
+++ b/components/net/lwip-2.1.2/src/lwipopts.h
@@ -238,11 +238,7 @@
#endif
/* ---------- Memory options ---------- */
-#ifdef RT_USING_ASM_MEMCPY
#define MEMCPY(dst,src,len) rt_memcpy(dst,src,len)
-#else
-#define MEMCPY(dst,src,len) memcpy(dst,src,len)
-#endif /* RT_USING_ASM_MEMCPY */
#define SMEMCPY(dst,src,len) MEMCPY(dst,src,len)
#define MEM_ALIGNMENT 4
diff --git a/src/Kconfig b/src/Kconfig
index 2bc37cf451..7c22752ed0 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -134,14 +134,6 @@ menu "kservice optimization"
bool "Enable kservice to use tiny size"
default n
- config RT_USING_ASM_MEMCPY
- bool
- default n
-
- config RT_USING_ASM_MEMSET
- bool
- default n
-
config RT_USING_TINY_FFS
bool "Enable kservice to use tiny finding first bit set method"
default n
diff --git a/src/kservice.c b/src/kservice.c
index 5d4311507d..a441124816 100644
--- a/src/kservice.c
+++ b/src/kservice.c
@@ -115,7 +115,6 @@ int *_rt_errno(void)
}
RTM_EXPORT(_rt_errno);
-#ifndef RT_USING_ASM_MEMSET
/**
* This function will set the content of memory to specified value.
*
@@ -128,7 +127,7 @@ RTM_EXPORT(_rt_errno);
*
* @return The address of source memory.
*/
-void *rt_memset(void *s, int c, rt_ubase_t count)
+RT_WEAK void *rt_memset(void *s, int c, rt_ubase_t count)
{
#ifdef RT_KSERVICE_USING_TINY_SIZE
char *xs = (char *)s;
@@ -201,9 +200,7 @@ void *rt_memset(void *s, int c, rt_ubase_t count)
#endif /* RT_KSERVICE_USING_TINY_SIZE */
}
RTM_EXPORT(rt_memset);
-#endif /* RT_USING_ASM_MEMSET */
-#ifndef RT_USING_ASM_MEMCPY
/**
* This function will copy memory content from source address to destination address.
*
@@ -215,7 +212,7 @@ RTM_EXPORT(rt_memset);
*
* @return The address of destination memory
*/
-void *rt_memcpy(void *dst, const void *src, rt_ubase_t count)
+RT_WEAK 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;
@@ -287,7 +284,6 @@ 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