mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-20 17:44:20 +08:00
[kservice] add RT_WEAK for rt_vsnprintf
This commit is contained in:
@@ -139,6 +139,10 @@ config RT_USING_ASM_MEMCPY
|
||||
bool
|
||||
default n
|
||||
|
||||
config RT_USING_ASM_MEMSET
|
||||
bool
|
||||
default n
|
||||
|
||||
endmenu
|
||||
|
||||
menuconfig RT_DEBUG
|
||||
|
||||
+5
-3
@@ -115,6 +115,7 @@ int *_rt_errno(void)
|
||||
}
|
||||
RTM_EXPORT(_rt_errno);
|
||||
|
||||
#ifndef RT_USING_ASM_MEMSET
|
||||
/**
|
||||
* This function will set the content of memory to specified value.
|
||||
*
|
||||
@@ -127,7 +128,7 @@ RTM_EXPORT(_rt_errno);
|
||||
*
|
||||
* @return The address of source memory.
|
||||
*/
|
||||
RT_WEAK void *rt_memset(void *s, int c, rt_ubase_t count)
|
||||
void *rt_memset(void *s, int c, rt_ubase_t count)
|
||||
{
|
||||
#ifdef RT_KSERVICE_USING_TINY_SIZE
|
||||
char *xs = (char *)s;
|
||||
@@ -200,6 +201,7 @@ RT_WEAK 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
|
||||
/**
|
||||
@@ -338,7 +340,7 @@ RTM_EXPORT(rt_memmove);
|
||||
* If the result > 0, cs is greater than ct.
|
||||
* If the result = 0, cs is equal to ct.
|
||||
*/
|
||||
RT_WEAK rt_int32_t rt_memcmp(const void *cs, const void *ct, rt_ubase_t count)
|
||||
rt_int32_t rt_memcmp(const void *cs, const void *ct, rt_ubase_t count)
|
||||
{
|
||||
const unsigned char *su1, *su2;
|
||||
int res = 0;
|
||||
@@ -842,7 +844,7 @@ static char *print_number(char *buf,
|
||||
*
|
||||
* @return The number of characters actually written to buffer.
|
||||
*/
|
||||
rt_int32_t rt_vsnprintf(char *buf,
|
||||
RT_WEAK rt_int32_t rt_vsnprintf(char *buf,
|
||||
rt_size_t size,
|
||||
const char *fmt,
|
||||
va_list args)
|
||||
|
||||
Reference in New Issue
Block a user