<div dir="ltr">agree! a simple rename would survice.results are the same .kernel is faster<div>could anyone help fix this ?</div></div><div class="gmail_extra"><br><div class="gmail_quote">2018-07-11 0:03 GMT+08:00 <span dir="ltr"><<a href="mailto:valdis.kletnieks@vt.edu" target="_blank">valdis.kletnieks@vt.edu</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Tue, 10 Jul 2018 22:51:34 +0800, bing zhu said:<br>
<br>
> Thank you ,I use this func for both kernel and user ,result are same.<br>
> void *memcpy(void *dest, const void *src, size_t n)<br>
> {<br>
<br>
</span>Might want to use 'void *my_memcpy(..)' instead, just in case the build<br>
environment plays #define games with you and causes a different memcpy()<br>
to get invoked instead.<br>
<br>
[/usr/src/linux-next] egrep -r '#define\s*memcpy\(' include/ arch/*/include<br>
arch/arm64/include/asm/string.<wbr>h:#define memcpy(dst, src, len) __memcpy(dst, src, len)<br>
arch/m68k/include/asm/string.<wbr>h:#define memcpy(d, s, n) __builtin_memcpy(d, s, n)<br>
arch/sparc/include/asm/string.<wbr>h:#define memcpy(t, f, n) __builtin_memcpy(t, f, n)<br>
arch/x86/include/asm/string_<wbr>64.h:#define memcpy(dst, src, len) \<br>
arch/x86/include/asm/string_<wbr>64.h:#define memcpy(dst, src, len) __memcpy(dst, src, len)<br>
arch/x86/include/asm/string_<wbr>32.h:#define memcpy(t, f, n) \<br>
arch/x86/include/asm/string_<wbr>32.h:#define memcpy(t, f, n) __builtin_memcpy(t, f, n)<br>
arch/x86/include/asm/string_<wbr>32.h:#define memcpy(t, f, n) \<br>
arch/xtensa/include/asm/<wbr>string.h:#define memcpy(dst, src, len) __memcpy(dst, src, len)<br>
<br>
</blockquote></div><br></div>