From: Ian Lance Taylor <iant@google.com>
To: gcc-patches@gcc.gnu.org, gofrontend-dev@googlegroups.com
Subject: libgo patch committed: Remove unnecessary EINTR tests
Date: Thu, 31 Mar 2011 23:03:00 -0000 [thread overview]
Message-ID: <mcripuzoru9.fsf@google.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 320 bytes --]
This libgo patch removes some unnecessary EINTR tests I added a couple
of months ago. The libgo library always uses SA_RESTART when setting up
a signal handler, so EINTR should never happen for functions like read
and write. Bootstrapped and ran Go testsuite on
x86_64-unknown-linux-gnu. Committed to mainline.
Ian
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch --]
[-- Type: text/x-diff, Size: 1998 bytes --]
diff -r a76876ca23b2 libgo/go/net/fd.go
--- a/libgo/go/net/fd.go Thu Mar 31 13:36:27 2011 -0700
+++ b/libgo/go/net/fd.go Thu Mar 31 15:16:23 2011 -0700
@@ -376,7 +376,7 @@
for {
var errno int
n, errno = syscall.Read(fd.sysfile.Fd(), p)
- if (errno == syscall.EAGAIN || errno == syscall.EINTR) && fd.rdeadline >= 0 {
+ if errno == syscall.EAGAIN && fd.rdeadline >= 0 {
pollserver.WaitRead(fd)
continue
}
@@ -411,7 +411,7 @@
for {
var errno int
n, sa, errno = syscall.Recvfrom(fd.sysfd, p, 0)
- if (errno == syscall.EAGAIN || errno == syscall.EINTR) && fd.rdeadline >= 0 {
+ if errno == syscall.EAGAIN && fd.rdeadline >= 0 {
pollserver.WaitRead(fd)
continue
}
@@ -444,7 +444,7 @@
for {
var errno int
n, oobn, flags, sa, errno = syscall.Recvmsg(fd.sysfd, p, oob, 0)
- if (errno == syscall.EAGAIN || errno == syscall.EINTR) && fd.rdeadline >= 0 {
+ if errno == syscall.EAGAIN && fd.rdeadline >= 0 {
pollserver.WaitRead(fd)
continue
}
@@ -490,7 +490,7 @@
if nn == len(p) {
break
}
- if (errno == syscall.EAGAIN || errno == syscall.EINTR) && fd.wdeadline >= 0 {
+ if errno == syscall.EAGAIN && fd.wdeadline >= 0 {
pollserver.WaitWrite(fd)
continue
}
@@ -526,7 +526,7 @@
var oserr os.Error
for {
errno := syscall.Sendto(fd.sysfd, p, 0, sa)
- if (errno == syscall.EAGAIN || errno == syscall.EINTR) && fd.wdeadline >= 0 {
+ if errno == syscall.EAGAIN && fd.wdeadline >= 0 {
pollserver.WaitWrite(fd)
continue
}
@@ -560,7 +560,7 @@
for {
var errno int
errno = syscall.Sendmsg(fd.sysfd, p, oob, sa, 0)
- if (errno == syscall.EAGAIN || errno == syscall.EINTR) && fd.wdeadline >= 0 {
+ if errno == syscall.EAGAIN && fd.wdeadline >= 0 {
pollserver.WaitWrite(fd)
continue
}
@@ -598,7 +598,7 @@
return nil, os.EINVAL
}
s, sa, e = syscall.Accept(fd.sysfd)
- if e != syscall.EAGAIN && e != syscall.EINTR {
+ if e != syscall.EAGAIN {
break
}
syscall.ForkLock.RUnlock()
reply other threads:[~2011-03-31 22:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=mcripuzoru9.fsf@google.com \
--to=iant@google.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=gofrontend-dev@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).