Skip to content

Commit

Permalink
Merge pull request #4211 from egpbos/patch-1
Browse files Browse the repository at this point in the history
fix unused parameter warning when POLL_BASED_ON_SELECT
  • Loading branch information
bluca committed Jun 15, 2021
2 parents 3b9ef60 + 535bc2a commit 9b2e1fa
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
13 changes: 13 additions & 0 deletions RELICENSE/NLeScienceCenter.md
@@ -0,0 +1,13 @@
# Permission to Relicense under MPLv2

This is a statement by the Netherlands eScience Center
that grants permission to relicense its copyrights in the libzmq C++
library (ZeroMQ) under the Mozilla Public License v2 (MPLv2).

A portion of the commits made by the Github handle "egpbos", with
commit author "E. G. Patrick Bos p.bos@esciencecenter.nl", are copyright of the Netherlands eScience Center.
This document hereby grants the libzmq project team to relicense libzmq,
including all past, present and future contributions of the author listed above.

Rob van Nieuwpoort <R.vanNieuwpoort@esciencecenter.nl>
2021/06/15
8 changes: 6 additions & 2 deletions src/polling_util.hpp
Expand Up @@ -109,20 +109,24 @@ timeout_t
compute_timeout (bool first_pass_, long timeout_, uint64_t now_, uint64_t end_);

#elif defined ZMQ_POLL_BASED_ON_SELECT
#if defined ZMQ_HAVE_WINDOWS
inline size_t valid_pollset_bytes (const fd_set &pollset_)
{
#if defined ZMQ_HAVE_WINDOWS
// On Windows we don't need to copy the whole fd_set.
// SOCKETS are continuous from the beginning of fd_array in fd_set.
// We just need to copy fd_count elements of fd_array.
// We gain huge memcpy() improvement if number of used SOCKETs is much lower than FD_SETSIZE.
return reinterpret_cast<const char *> (
&pollset_.fd_array[pollset_.fd_count])
- reinterpret_cast<const char *> (&pollset_);
}
#else
inline size_t valid_pollset_bytes (const fd_set &/*pollset_*/)
{
return sizeof (fd_set);
#endif
}
#endif


#if defined ZMQ_HAVE_WINDOWS
// struct fd_set {
Expand Down

0 comments on commit 9b2e1fa

Please sign in to comment.