Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
753e7b85
Commit
753e7b85
authored
Jan 26, 2011
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
net: Check for EINTR.
From-SVN: r169309
parent
dcf25f59
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
libgo/go/net/fd.go
+7
-7
No files found.
libgo/go/net/fd.go
View file @
753e7b85
...
...
@@ -350,7 +350,7 @@ func (fd *netFD) Read(p []byte) (n int, err os.Error) {
for
{
var
errno
int
n
,
errno
=
syscall
.
Read
(
fd
.
sysfile
.
Fd
(),
p
)
if
errno
==
syscall
.
EAGAIN
&&
fd
.
rdeadline
>=
0
{
if
(
errno
==
syscall
.
EAGAIN
||
errno
==
syscall
.
EINTR
)
&&
fd
.
rdeadline
>=
0
{
pollserver
.
WaitRead
(
fd
)
continue
}
...
...
@@ -385,7 +385,7 @@ func (fd *netFD) ReadFrom(p []byte) (n int, sa syscall.Sockaddr, err os.Error) {
for
{
var
errno
int
n
,
sa
,
errno
=
syscall
.
Recvfrom
(
fd
.
sysfd
,
p
,
0
)
if
errno
==
syscall
.
EAGAIN
&&
fd
.
rdeadline
>=
0
{
if
(
errno
==
syscall
.
EAGAIN
||
errno
==
syscall
.
EINTR
)
&&
fd
.
rdeadline
>=
0
{
pollserver
.
WaitRead
(
fd
)
continue
}
...
...
@@ -418,7 +418,7 @@ func (fd *netFD) ReadMsg(p []byte, oob []byte) (n, oobn, flags int, sa syscall.S
for
{
var
errno
int
n
,
oobn
,
flags
,
sa
,
errno
=
syscall
.
Recvmsg
(
fd
.
sysfd
,
p
,
oob
,
0
)
if
errno
==
syscall
.
EAGAIN
&&
fd
.
rdeadline
>=
0
{
if
(
errno
==
syscall
.
EAGAIN
||
errno
==
syscall
.
EINTR
)
&&
fd
.
rdeadline
>=
0
{
pollserver
.
WaitRead
(
fd
)
continue
}
...
...
@@ -464,7 +464,7 @@ func (fd *netFD) Write(p []byte) (n int, err os.Error) {
if
nn
==
len
(
p
)
{
break
}
if
errno
==
syscall
.
EAGAIN
&&
fd
.
wdeadline
>=
0
{
if
(
errno
==
syscall
.
EAGAIN
||
errno
==
syscall
.
EINTR
)
&&
fd
.
wdeadline
>=
0
{
pollserver
.
WaitWrite
(
fd
)
continue
}
...
...
@@ -500,7 +500,7 @@ func (fd *netFD) WriteTo(p []byte, sa syscall.Sockaddr) (n int, err os.Error) {
var
oserr
os
.
Error
for
{
errno
:=
syscall
.
Sendto
(
fd
.
sysfd
,
p
,
0
,
sa
)
if
errno
==
syscall
.
EAGAIN
&&
fd
.
wdeadline
>=
0
{
if
(
errno
==
syscall
.
EAGAIN
||
errno
==
syscall
.
EINTR
)
&&
fd
.
wdeadline
>=
0
{
pollserver
.
WaitWrite
(
fd
)
continue
}
...
...
@@ -534,7 +534,7 @@ func (fd *netFD) WriteMsg(p []byte, oob []byte, sa syscall.Sockaddr) (n int, oob
for
{
var
errno
int
errno
=
syscall
.
Sendmsg
(
fd
.
sysfd
,
p
,
oob
,
sa
,
0
)
if
errno
==
syscall
.
EAGAIN
&&
fd
.
wdeadline
>=
0
{
if
(
errno
==
syscall
.
EAGAIN
||
errno
==
syscall
.
EINTR
)
&&
fd
.
wdeadline
>=
0
{
pollserver
.
WaitWrite
(
fd
)
continue
}
...
...
@@ -572,7 +572,7 @@ func (fd *netFD) accept(toAddr func(syscall.Sockaddr) Addr) (nfd *netFD, err os.
return
nil
,
os
.
EINVAL
}
s
,
sa
,
e
=
syscall
.
Accept
(
fd
.
sysfd
)
if
e
!=
syscall
.
EAGAIN
{
if
e
!=
syscall
.
EAGAIN
&&
e
!=
syscall
.
EINTR
{
break
}
syscall
.
ForkLock
.
RUnlock
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment