From patchwork Mon Jun 30 04:56:34 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siddhesh Poyarekar X-Patchwork-Id: 1813 Received: (qmail 8273 invoked by alias); 30 Jun 2014 04:55:18 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 8213 invoked by uid 89); 30 Jun 2014 04:55:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.5 required=5.0 tests=AWL, BAYES_00, SPF_HELO_PASS, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Date: Mon, 30 Jun 2014 10:26:34 +0530 From: Siddhesh Poyarekar To: Roland McGrath Cc: Chris Metcalf , Will Newton , libc-alpha Subject: [PATCH] Add comment for MEMCPY_OK_FOR_FWD_MEMMOVE Message-ID: <20140630045634.GM4477@spoyarek.pnq.redhat.com> References: <20140626185412.GA1826@spoyarek.pnq.redhat.com> <20140626190423.572732C3993@topped-with-meat.com> <20140627092109.GD4477@spoyarek.pnq.redhat.com> <20140627171326.GE4477@spoyarek.pnq.redhat.com> <53ADD391.2030803@tilera.com> <20140628004821.GK4477@spoyarek.pnq.redhat.com> <20140628042605.8EC612C3A0D@topped-with-meat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20140628042605.8EC612C3A0D@topped-with-meat.com> User-Agent: Mutt/1.5.22.1-rc1 (2013-10-16) 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 */