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.21-33-gc187253


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  c187253fc222ed05de710d94b5bcaf02c3ef37c5 (commit)
      from  e9a5bc1c18b5acf3c8475e3f36431ac34bda9751 (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://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c187253fc222ed05de710d94b5bcaf02c3ef37c5

commit c187253fc222ed05de710d94b5bcaf02c3ef37c5
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Sat Feb 7 22:18:03 2015 +0100

    hurdselect: remove dead code.
    
    This removes code which actually never happens, and is already taken
    care of in the function.
    
    This is in the second part of select, when the __mach_msg() function
    over the portset has returned something else than MACH_MSG_SUCCESS. I
    guess in the past the value returned by __mach_msg() was stored in err,
    so this code was necessary to set back err to 0, but now it is stored in
    msgerr, so err is already still 0 by default. It can thus never contain
    MACH_RCV_TIMED_OUT, i.e. the code is dead. The first case mentioned in
    the comment is already handled: on time out with no message, err is
    already still the default 0. On time out due to poll, err would still be
    0, unless some of the io_select RPCs has returned EINTR, in which case
    it contains EINTR. If any other io_select RPCs had returned a proper
    answer, got!=0, and thus err is set to 0 just below. The code is thus
    indeed not useful any more.

diff --git a/ChangeLog b/ChangeLog
index 97849df..4ba04cd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -24,6 +24,8 @@
 	45.
 	* hurd/hurdselect.c (_hurd_select): Pass MACH_RCV_INTERRUPT to
 	__mach_msg.  If that returns MACH_RCV_INTERRUPTED, set ERR to EINTR.
+	* hurd/hurdselect.c (_hurd_select): Remove unreachable check for
+	MACH_RCV_TIMED_OUT.
 
 2015-02-06  Roland McGrath  <roland@hack.frob.com>
 
diff --git a/hurd/hurdselect.c b/hurd/hurdselect.c
index bd31c94..1d90854 100644
--- a/hurd/hurdselect.c
+++ b/hurd/hurdselect.c
@@ -407,13 +407,6 @@ _hurd_select (int nfds,
 	    }
 	}
 
-      if (err == MACH_RCV_TIMED_OUT)
-	/* This is the normal value for ERR.  We might have timed out and
-	   read no messages.  Otherwise, after receiving the first message,
-	   we poll for more messages.  We receive with a timeout of 0 to
-	   effect a poll, so ERR is MACH_RCV_TIMED_OUT when the poll finds no
-	   message waiting.  */
-	err = 0;
       if (msgerr == MACH_RCV_INTERRUPTED)
 	/* Interruption on our side (e.g. signal reception).  */
 	err = EINTR;

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

Summary of changes:
 ChangeLog         |    2 ++
 hurd/hurdselect.c |    7 -------
 2 files changed, 2 insertions(+), 7 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]