Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
L
libzmq
Project
Project
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
libzmq
Commits
fa804c77
Commit
fa804c77
authored
Dec 23, 2019
by
Simon Giesecke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Problem: pseudo-loops which had exactly one iteration
Solution: removed them
parent
579aa5b4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
27 deletions
+21
-27
socket_poller.cpp
src/socket_poller.cpp
+21
-27
No files found.
src/socket_poller.cpp
View file @
fa804c77
...
...
@@ -596,14 +596,11 @@ int zmq::socket_poller_t::wait (zmq::socket_poller_t::event_t *events_,
static_cast
<
int
>
(
std
::
min
<
uint64_t
>
(
end
-
now
,
INT_MAX
));
// Wait for events.
while
(
true
)
{
int
rc
=
poll
(
_pollfds
,
_pollset_size
,
timeout
);
if
(
rc
==
-
1
&&
errno
==
EINTR
)
{
return
-
1
;
}
errno_assert
(
rc
>=
0
);
break
;
int
rc
=
poll
(
_pollfds
,
_pollset_size
,
timeout
);
if
(
rc
==
-
1
&&
errno
==
EINTR
)
{
return
-
1
;
}
errno_assert
(
rc
>=
0
);
// Receive the signal from pollfd
if
(
_use_signaler
&&
_pollfds
[
0
].
revents
&
POLLIN
)
...
...
@@ -653,29 +650,26 @@ int zmq::socket_poller_t::wait (zmq::socket_poller_t::event_t *events_,
}
// Wait for events. Ignore interrupts if there's infinite timeout.
while
(
true
)
{
memcpy
(
inset
.
get
(),
_pollset_in
.
get
(),
valid_pollset_bytes
(
*
_pollset_in
.
get
()));
memcpy
(
outset
.
get
(),
_pollset_out
.
get
(),
valid_pollset_bytes
(
*
_pollset_out
.
get
()));
memcpy
(
errset
.
get
(),
_pollset_err
.
get
(),
valid_pollset_bytes
(
*
_pollset_err
.
get
()));
const
int
rc
=
select
(
static_cast
<
int
>
(
_max_fd
+
1
),
inset
.
get
(),
outset
.
get
(),
errset
.
get
(),
ptimeout
);
memcpy
(
inset
.
get
(),
_pollset_in
.
get
(),
valid_pollset_bytes
(
*
_pollset_in
.
get
()));
memcpy
(
outset
.
get
(),
_pollset_out
.
get
(),
valid_pollset_bytes
(
*
_pollset_out
.
get
()));
memcpy
(
errset
.
get
(),
_pollset_err
.
get
(),
valid_pollset_bytes
(
*
_pollset_err
.
get
()));
const
int
rc
=
select
(
static_cast
<
int
>
(
_max_fd
+
1
),
inset
.
get
(),
outset
.
get
(),
errset
.
get
(),
ptimeout
);
#if defined ZMQ_HAVE_WINDOWS
if
(
unlikely
(
rc
==
SOCKET_ERROR
))
{
errno
=
wsa_error_to_errno
(
WSAGetLastError
());
wsa_assert
(
errno
==
ENOTSOCK
);
return
-
1
;
}
if
(
unlikely
(
rc
==
SOCKET_ERROR
))
{
errno
=
wsa_error_to_errno
(
WSAGetLastError
());
wsa_assert
(
errno
==
ENOTSOCK
);
return
-
1
;
}
#else
if
(
unlikely
(
rc
==
-
1
))
{
errno_assert
(
errno
==
EINTR
||
errno
==
EBADF
);
return
-
1
;
}
#endif
break
;
if
(
unlikely
(
rc
==
-
1
))
{
errno_assert
(
errno
==
EINTR
||
errno
==
EBADF
);
return
-
1
;
}
#endif
if
(
_use_signaler
&&
FD_ISSET
(
_signaler
->
get_fd
(),
inset
.
get
()))
_signaler
->
recv
();
...
...
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