diff mbox

Add comment for MEMCPY_OK_FOR_FWD_MEMMOVE

Message ID 20140630045634.GM4477@spoyarek.pnq.redhat.com
State Committed
Headers show

Commit Message

Siddhesh Poyarekar June 30, 2014, 4:56 a.m. UTC
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.

Comments

Roland McGrath July 4, 2014, 3:11 a.m. UTC | #1
Oh, yes, please.  And don't wait for slow review when it's just comments.
More is better and I can always change it later if I get exercised about
wordsmithing.  (In this case, I just overlooked the message for days.)
diff mbox

Patch

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