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
9013ee0d
Commit
9013ee0d
authored
Nov 13, 2012
by
Martin Hurton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor code cleanup
parent
c179ad11
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
9 deletions
+12
-9
epoll.cpp
src/epoll.cpp
+3
-2
kqueue.cpp
src/kqueue.cpp
+3
-2
poll.cpp
src/poll.cpp
+3
-3
select.cpp
src/select.cpp
+3
-2
No files found.
src/epoll.cpp
View file @
9013ee0d
...
...
@@ -140,9 +140,10 @@ void zmq::epoll_t::loop ()
// Wait for events.
int
n
=
epoll_wait
(
epoll_fd
,
&
ev_buf
[
0
],
max_io_events
,
timeout
?
timeout
:
-
1
);
if
(
n
==
-
1
&&
errno
==
EINTR
)
if
(
n
==
-
1
)
{
errno_assert
(
errno
==
EINTR
);
continue
;
errno_assert
(
n
!=
-
1
);
}
for
(
int
i
=
0
;
i
<
n
;
i
++
)
{
poll_entry_t
*
pe
=
((
poll_entry_t
*
)
ev_buf
[
i
].
data
.
ptr
);
...
...
src/kqueue.cpp
View file @
9013ee0d
...
...
@@ -163,9 +163,10 @@ void zmq::kqueue_t::loop ()
timespec
ts
=
{
timeout
/
1000
,
(
timeout
%
1000
)
*
1000000
};
int
n
=
kevent
(
kqueue_fd
,
NULL
,
0
,
&
ev_buf
[
0
],
max_io_events
,
timeout
?
&
ts
:
NULL
);
if
(
n
==
-
1
&&
errno
==
EINTR
)
if
(
n
==
-
1
)
{
errno_assert
(
errno
==
EINTR
);
continue
;
errno_assert
(
n
!=
-
1
);
}
for
(
int
i
=
0
;
i
<
n
;
i
++
)
{
poll_entry_t
*
pe
=
(
poll_entry_t
*
)
ev_buf
[
i
].
udata
;
...
...
src/poll.cpp
View file @
9013ee0d
...
...
@@ -125,10 +125,10 @@ void zmq::poll_t::loop ()
// Wait for events.
int
rc
=
poll
(
&
pollset
[
0
],
pollset
.
size
(),
timeout
?
timeout
:
-
1
);
if
(
rc
==
-
1
&&
errno
==
EINTR
)
if
(
rc
==
-
1
)
{
errno_assert
(
errno
==
EINTR
);
continue
;
errno_assert
(
rc
!=
-
1
);
}
// If there are no events (i.e. it's a timeout) there's no point
// in checking the pollset.
...
...
src/select.cpp
View file @
9013ee0d
...
...
@@ -168,9 +168,10 @@ void zmq::select_t::loop ()
#else
int
rc
=
select
(
maxfd
+
1
,
&
readfds
,
&
writefds
,
&
exceptfds
,
timeout
?
&
tv
:
NULL
);
if
(
rc
==
-
1
&&
errno
==
EINTR
)
if
(
rc
==
-
1
)
{
errno_assert
(
errno
==
EINTR
);
continue
;
errno_assert
(
rc
!=
-
1
);
}
#endif
// If there are no events (i.e. it's a timeout) there's no point
...
...
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