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.12-247-gf257bbd


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  f257bbd77dfcfdf9fa305e220b295e4ad57f405d (commit)
      from  fa9c15cb83a256da27f8ab99207b752e598c4937 (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=f257bbd77dfcfdf9fa305e220b295e4ad57f405d

commit f257bbd77dfcfdf9fa305e220b295e4ad57f405d
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Sun Jan 9 16:49:17 2011 -0500

    Clean up some bits/select.h headers.

diff --git a/ChangeLog b/ChangeLog
index 1ce2554..0d73576 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2011-01-09  Ulrich Drepper  <drepper@gmail.com>
+
+	* sysdeps/i386/bits/select.h: Don't use asm code for __FD_SET,
+	__FD_CLR, and __FS_ISSET.  gcc generates better code on its own.
+
+	* sysdeps/x86_64/bits/select.h: Mark value of __FD_SET and __FD_CLR as
+	void.
+	* bits/select.h: Likewise.
+
 2011-01-08  Ulrich Drepper  <drepper@gmail.com>
 
 	* po/ja.po: Update from translation team.
diff --git a/bits/select.h b/bits/select.h
index 47e7ded..8a4e537 100644
--- a/bits/select.h
+++ b/bits/select.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2001, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -30,6 +30,8 @@
     for (__i = 0; __i < sizeof (fd_set) / sizeof (__fd_mask); ++__i)	      \
       __FDS_BITS (__arr)[__i] = 0;					      \
   } while (0)
-#define __FD_SET(d, s)     (__FDS_BITS (s)[__FDELT(d)] |= __FDMASK(d))
-#define __FD_CLR(d, s)     (__FDS_BITS (s)[__FDELT(d)] &= ~__FDMASK(d))
-#define __FD_ISSET(d, s)   ((__FDS_BITS (s)[__FDELT(d)] & __FDMASK(d)) != 0)
+#define __FD_SET(d, s) \
+  ((void) (__FDS_BITS (s)[__FDELT(d)] |= __FDMASK(d)))
+#define __FD_CLR(d, s) \
+  ((void) (__FDS_BITS (s)[__FDELT(d)] &= ~__FDMASK(d)))
+#define __FD_ISSET(d, s)   ((__FDS_BITS (s)[__FDELT (d)] & __FDMASK (d)) != 0)
diff --git a/sysdeps/i386/bits/select.h b/sysdeps/i386/bits/select.h
index 972bfb6..ab9aa3d 100644
--- a/sysdeps/i386/bits/select.h
+++ b/sysdeps/i386/bits/select.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 1999, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999, 2001, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -22,7 +22,6 @@
 
 
 #if defined __GNUC__ && __GNUC__ >= 2
-
 # define __FD_ZERO(fdsp) \
   do {									      \
     int __d0, __d1;							      \
@@ -34,26 +33,6 @@
 			  : "memory");					      \
   } while (0)
 
-# define __FD_SET(fd, fdsp) \
-  __asm__ __volatile__ ("btsl %1,%0"					      \
-			: "=m" (__FDS_BITS (fdsp)[__FDELT (fd)])	      \
-			: "r" (((int) (fd)) % __NFDBITS)		      \
-			: "cc","memory")
-# define __FD_CLR(fd, fdsp) \
-  __asm__ __volatile__ ("btrl %1,%0"					      \
-			: "=m" (__FDS_BITS (fdsp)[__FDELT (fd)])	      \
-			: "r" (((int) (fd)) % __NFDBITS)		      \
-			: "cc","memory")
-# define __FD_ISSET(fd, fdsp) \
-  (__extension__							      \
-   ({register char __result;						      \
-     __asm__ __volatile__ ("btl %1,%2 ; setcb %b0"			      \
-			   : "=q" (__result)				      \
-			   : "r" (((int) (fd)) % __NFDBITS),		      \
-			     "m" (__FDS_BITS (fdsp)[__FDELT (fd)])	      \
-			   : "cc");					      \
-     __result; }))
-
 #else	/* ! GNU CC */
 
 /* We don't use `memset' because this would require a prototype and
@@ -65,8 +44,12 @@
     for (__i = 0; __i < sizeof (fd_set) / sizeof (__fd_mask); ++__i)	      \
       __FDS_BITS (__arr)[__i] = 0;					      \
   } while (0)
-# define __FD_SET(d, set)    (__FDS_BITS (set)[__FDELT (d)] |= __FDMASK (d))
-# define __FD_CLR(d, set)    (__FDS_BITS (set)[__FDELT (d)] &= ~__FDMASK (d))
-# define __FD_ISSET(d, set)  (__FDS_BITS (set)[__FDELT (d)] & __FDMASK (d))
 
 #endif	/* GNU CC */
+
+#define __FD_SET(d, set) \
+  ((void) (__FDS_BITS (set)[__FDELT (d)] |= __FDMASK (d)))
+#define __FD_CLR(d, set) \
+  ((void) (__FDS_BITS (set)[__FDELT (d)] &= ~__FDMASK (d)))
+#define __FD_ISSET(d, set) \
+  ((__FDS_BITS (set)[__FDELT (d)] & __FDMASK (d)) != 0)
diff --git a/sysdeps/x86_64/bits/select.h b/sysdeps/x86_64/bits/select.h
index 5f31b84..a300d58 100644
--- a/sysdeps/x86_64/bits/select.h
+++ b/sysdeps/x86_64/bits/select.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997,1998,1999,2001,2008,2009 Free Software Foundation, Inc.
+/* Copyright (C) 1997-1999,2001,2008,2009,2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -56,7 +56,9 @@
 
 #endif	/* GNU CC */
 
-#define __FD_SET(d, set)    (__FDS_BITS (set)[__FDELT (d)] |= __FDMASK (d))
-#define __FD_CLR(d, set)    (__FDS_BITS (set)[__FDELT (d)] &= ~__FDMASK (d))
+#define __FD_SET(d, set) \
+  ((void) (__FDS_BITS (set)[__FDELT (d)] |= __FDMASK (d)))
+#define __FD_CLR(d, set) \
+  ((void) (__FDS_BITS (set)[__FDELT (d)] &= ~__FDMASK (d)))
 #define __FD_ISSET(d, set) \
   ((__FDS_BITS (set)[__FDELT (d)] & __FDMASK (d)) != 0)

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

Summary of changes:
 ChangeLog                    |    9 +++++++++
 bits/select.h                |   10 ++++++----
 sysdeps/i386/bits/select.h   |   33 ++++++++-------------------------
 sysdeps/x86_64/bits/select.h |    8 +++++---
 4 files changed, 28 insertions(+), 32 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]