From: valdis.kletnieks@vt.edu (valdis.kletnieks at vt.edu)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Question about memcpy
Date: Tue, 10 Jul 2018 12:03:42 -0400 [thread overview]
Message-ID: <15979.1531238622@turing-police.cc.vt.edu> (raw)
In-Reply-To: <CACdNawrZxMSGT5he7Vnhy0e6kz1MAOT7G2fNUPFs9gUx8G2duA@mail.gmail.com>
On Tue, 10 Jul 2018 22:51:34 +0800, bing zhu said:
> Thank you ,I use this func for both kernel and user ,result are same.
> void *memcpy(void *dest, const void *src, size_t n)
> {
Might want to use 'void *my_memcpy(..)' instead, just in case the build
environment plays #define games with you and causes a different memcpy()
to get invoked instead.
[/usr/src/linux-next] egrep -r '#define\s*memcpy\(' include/ arch/*/include
arch/arm64/include/asm/string.h:#define memcpy(dst, src, len) __memcpy(dst, src, len)
arch/m68k/include/asm/string.h:#define memcpy(d, s, n) __builtin_memcpy(d, s, n)
arch/sparc/include/asm/string.h:#define memcpy(t, f, n) __builtin_memcpy(t, f, n)
arch/x86/include/asm/string_64.h:#define memcpy(dst, src, len) \
arch/x86/include/asm/string_64.h:#define memcpy(dst, src, len) __memcpy(dst, src, len)
arch/x86/include/asm/string_32.h:#define memcpy(t, f, n) \
arch/x86/include/asm/string_32.h:#define memcpy(t, f, n) __builtin_memcpy(t, f, n)
arch/x86/include/asm/string_32.h:#define memcpy(t, f, n) \
arch/xtensa/include/asm/string.h:#define memcpy(dst, src, len) __memcpy(dst, src, len)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 486 bytes
Desc: not available
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20180710/85541f24/attachment.sig>
next prev parent reply other threads:[~2018-07-10 16:03 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-07 11:36 Question about memcpy bing zhu
2018-07-07 18:44 ` valdis.kletnieks at vt.edu
2018-07-08 14:03 ` bing zhu
2018-07-09 7:54 ` 袁建鹏
2018-07-09 8:14 ` bing zhu
2018-07-09 14:04 ` Himanshu Jha
2018-07-09 16:16 ` valdis.kletnieks at vt.edu
2018-07-14 10:10 ` Himanshu Jha
2018-07-10 4:50 ` bing zhu
2018-07-10 6:22 ` Greg KH
2018-07-10 14:51 ` bing zhu
2018-07-10 14:57 ` Greg KH
2018-07-10 16:03 ` valdis.kletnieks at vt.edu [this message]
2018-07-12 4:47 ` bing zhu
2018-07-12 5:34 ` Greg KH
2018-07-12 14:27 ` bing zhu
2018-07-12 14:53 ` Greg KH
2018-07-13 3:02 ` bing zhu
2018-07-13 7:33 ` valdis.kletnieks at vt.edu
2018-07-17 2:44 ` bing zhu
2018-07-12 16:49 ` valdis.kletnieks at vt.edu
-- strict thread matches above, loose matches on Subject: below --
2018-07-07 13:21 Alex Arvelaez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=15979.1531238622@turing-police.cc.vt.edu \
--to=valdis.kletnieks@vt.edu \
--cc=kernelnewbies@lists.kernelnewbies.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).