Add comment for MEMCPY_OK_FOR_FWD_MEMMOVE
Commit Message
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
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.)
@@ -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 */