This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Add comment for MEMCPY_OK_FOR_FWD_MEMMOVE


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 */

Attachment: pgpOzFwA5RRhP.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]