This is the mail archive of the glibc-cvs@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]

GNU C Library master sources branch, master, updated. glibc-2.15-523-g20fde22


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  20fde227388fb0c2857ff1793754056b833697fe (commit)
      from  984a42374ce2055836f580c2240306171757ea72 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=20fde227388fb0c2857ff1793754056b833697fe

commit 20fde227388fb0c2857ff1793754056b833697fe
Author: David S. Miller <davem@davemloft.net>
Date:   Thu Mar 29 14:38:27 2012 -0700

    Remove xsputn small copy optimization.
    
    	* libio/fileops.c (_IO_new_file_xsputn): Don't try to optimize
    	small copies by hand.

diff --git a/ChangeLog b/ChangeLog
index 165a178..ec22026 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-03-29  David S. Miller  <davem@davemloft.net>
+
+	* libio/fileops.c (_IO_new_file_xsputn): Don't try to optimize
+	small copies by hand.
+
 2012-03-28  Siddhesh Poyarekar  <siddhesh@redhat.com>
 
 	[BZ #13761]
diff --git a/libio/fileops.c b/libio/fileops.c
index 95e09b4..a2e8dac 100644
--- a/libio/fileops.c
+++ b/libio/fileops.c
@@ -1341,24 +1341,13 @@ _IO_new_file_xsputn (f, data, n)
     {
       if (count > to_do)
 	count = to_do;
-      if (count > 20)
-	{
 #ifdef _LIBC
-	  f->_IO_write_ptr = __mempcpy (f->_IO_write_ptr, s, count);
+      f->_IO_write_ptr = __mempcpy (f->_IO_write_ptr, s, count);
 #else
-	  memcpy (f->_IO_write_ptr, s, count);
-	  f->_IO_write_ptr += count;
+      memcpy (f->_IO_write_ptr, s, count);
+      f->_IO_write_ptr += count;
 #endif
-	  s += count;
-	}
-      else
-	{
-	  register char *p = f->_IO_write_ptr;
-	  register int i = (int) count;
-	  while (--i >= 0)
-	    *p++ = *s++;
-	  f->_IO_write_ptr = p;
-	}
+      s += count;
       to_do -= count;
     }
   if (to_do + must_flush > 0)

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog       |    5 +++++
 libio/fileops.c |   19 ++++---------------
 2 files changed, 9 insertions(+), 15 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


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