[PATCH] Add comment for MEMCPY_OK_FOR_FWD_MEMMOVE

Siddhesh Poyarekar siddhesh@redhat.com
Mon Jun 30 04:55:00 GMT 2014


On Fri, Jun 27, 2014 at 09:26:05PM -0700, Roland McGrath wrote:
> This name is pretty self-explanatory, but as a general rule a
> sysdeps/generic file like should have copious comments that make clear what
> the protocol for other sysdeps variants is and what each symbol means.

OK, how about this:

Siddhesh

	* sysdeps/generic/memcopy.h: Add comment for
	MEMCPY_OK_FOR_FWD_MEMMOVE.

diff --git a/sysdeps/generic/memcopy.h b/sysdeps/generic/memcopy.h
index b39a960..b7bd5e9 100644
--- a/sysdeps/generic/memcopy.h
+++ b/sysdeps/generic/memcopy.h
@@ -148,6 +148,9 @@ extern void _wordcopy_bwd_dest_aligned (long int, long int, size_t) __THROW;
 /* Threshold value for when to enter the unrolled loops.  */
 #define	OP_T_THRES	16
 
+/* Set to 1 if memcpy is safe to use for forward-copying memmove with
+   overlapping addresses.  This is 0 by default because memcpy implementations
+   are generally not safe for overlapping addresses.  */
 #define MEMCPY_OK_FOR_FWD_MEMMOVE 0
 
 #endif /* memcopy.h */
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20140630/b853e435/attachment.sig>


More information about the Libc-alpha mailing list