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
1879b8ba
Commit
1879b8ba
authored
Feb 17, 2014
by
Pieter Hintjens
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #899 from olafmandel/duplicate_poller_detect
Remove duplicate poller decision making
parents
f789177a
48b50cef
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
88 additions
and
135 deletions
+88
-135
CMakeLists.txt
CMakeLists.txt
+49
-5
acinclude.m4
acinclude.m4
+1
-1
platform.hpp.in
builds/cmake/platform.hpp.in
+5
-7
Makefile.mingw32
builds/mingw32/Makefile.mingw32
+1
-1
libzmq.vcproj
builds/msvc/libzmq/libzmq.vcproj
+5
-5
ZeroMQ.props
builds/msvc/properties/ZeroMQ.props
+1
-1
ZeroMQ_Static.props
builds/msvc/properties/ZeroMQ_Static.props
+1
-1
poller.hpp
src/poller.hpp
+18
-47
proxy.cpp
src/proxy.cpp
+1
-16
signaler.cpp
src/signaler.cpp
+5
-28
zmq.cpp
src/zmq.cpp
+1
-23
No files found.
CMakeLists.txt
View file @
1879b8ba
...
@@ -10,11 +10,56 @@ if(APPLE)
...
@@ -10,11 +10,56 @@ if(APPLE)
endif
()
endif
()
set
(
POLLER
""
CACHE STRING
"Choose polling system
manually
. valid values are
set
(
POLLER
""
CACHE STRING
"Choose polling system. valid values are
kqueue, epoll, devpoll, poll or select [default=autodetect]"
)
kqueue, epoll, devpoll, poll or select [default=autodetect]"
)
if
(
NOT POLLER STREQUAL
""
include
(
CheckFunctionExists
)
AND NOT POLLER STREQUAL
"kqueue"
include
(
CheckTypeSize
)
if
(
POLLER STREQUAL
""
)
set
(
CMAKE_REQUIRED_INCLUDES sys/event.h
)
check_function_exists
(
kqueue HAVE_KQUEUE
)
set
(
CMAKE_REQUIRED_INCLUDES
)
if
(
HAVE_KQUEUE
)
set
(
POLLER
"kqueue"
)
else
()
set
(
CMAKE_REQUIRED_INCLUDES sys/epoll.h
)
check_function_exists
(
epoll_create HAVE_EPOLL
)
set
(
CMAKE_REQUIRED_INCLUDES
)
if
(
HAVE_EPOLL
)
set
(
POLLER
"epoll"
)
else
()
set
(
CMAKE_REQUIRED_INCLUDES sys/devpoll.h
)
check_type_size
(
"struct pollfd"
DEVPOLL
)
set
(
CMAKE_REQUIRED_INCLUDES
)
if
(
HAVE_DEVPOLL
)
set
(
POLLER
"devpoll"
)
else
()
set
(
CMAKE_REQUIRED_INCLUDES poll.h
)
check_function_exists
(
poll HAVE_POLL
)
set
(
CMAKE_REQUIRED_INCLUDES
)
if
(
HAVE_POLL
)
set
(
POLLER
"poll"
)
else
()
if
(
CMAKE_HOST_WIN32
)
set
(
CMAKE_REQUIRED_INCLUDES winsock2.h
)
else
()
set
(
CMAKE_REQUIRED_INCLUDES sys/select.h
)
endif
()
check_function_exists
(
select HAVE_SELECT
)
set
(
CMAKE_REQUIRED_INCLUDES
)
if
(
HAVE_SELECT
)
set
(
POLLER
"select"
)
else
()
message
(
FATAL_ERROR
"Could not autodetect polling method"
)
endif
()
endif
()
endif
()
endif
()
endif
()
endif
()
if
(
NOT POLLER STREQUAL
"kqueue"
AND NOT POLLER STREQUAL
"epoll"
AND NOT POLLER STREQUAL
"epoll"
AND NOT POLLER STREQUAL
"devpoll"
AND NOT POLLER STREQUAL
"devpoll"
AND NOT POLLER STREQUAL
"poll"
AND NOT POLLER STREQUAL
"poll"
...
@@ -24,7 +69,7 @@ endif()
...
@@ -24,7 +69,7 @@ endif()
if
(
NOT
${
POLLER
}
STREQUAL
""
)
if
(
NOT
${
POLLER
}
STREQUAL
""
)
string
(
TOUPPER
${
POLLER
}
UPPER_POLLER
)
string
(
TOUPPER
${
POLLER
}
UPPER_POLLER
)
set
(
ZMQ_
FORC
E_
${
UPPER_POLLER
}
1
)
set
(
ZMQ_
US
E_
${
UPPER_POLLER
}
1
)
endif
()
endif
()
set
(
ZMQ_CMAKE_MODULES_DIR
${
CMAKE_CURRENT_SOURCE_DIR
}
/builds/cmake/Modules
)
set
(
ZMQ_CMAKE_MODULES_DIR
${
CMAKE_CURRENT_SOURCE_DIR
}
/builds/cmake/Modules
)
...
@@ -34,7 +79,6 @@ include(TestZMQVersion)
...
@@ -34,7 +79,6 @@ include(TestZMQVersion)
include
(
ZMQSourceRunChecks
)
include
(
ZMQSourceRunChecks
)
include
(
CheckIncludeFiles
)
include
(
CheckIncludeFiles
)
include
(
CheckLibraryExists
)
include
(
CheckLibraryExists
)
include
(
CheckFunctionExists
)
include
(
CheckCCompilerFlag
)
include
(
CheckCCompilerFlag
)
include
(
CheckCXXCompilerFlag
)
include
(
CheckCXXCompilerFlag
)
include
(
CheckCSourceCompiles
)
include
(
CheckCSourceCompiles
)
...
...
acinclude.m4
View file @
1879b8ba
...
@@ -922,7 +922,7 @@ AC_DEFUN([LIBZMQ_CHECK_POLLER], [{
...
@@ -922,7 +922,7 @@ AC_DEFUN([LIBZMQ_CHECK_POLLER], [{
;;
;;
esac
esac
libzmq_cv_poller_flag=`echo "ZMQ_
FORC
E_${libzmq_cv_poller}" | tr a-z A-Z`
libzmq_cv_poller_flag=`echo "ZMQ_
US
E_${libzmq_cv_poller}" | tr a-z A-Z`
AS_IF([test "x${libzmq_cv_poller}" != "x"],
AS_IF([test "x${libzmq_cv_poller}" != "x"],
[AC_MSG_RESULT([using $libzmq_cv_poller]) ; $1], [AC_MSG_RESULT(no suitable polling system found) ; $2])
[AC_MSG_RESULT([using $libzmq_cv_poller]) ; $1], [AC_MSG_RESULT(no suitable polling system found) ; $2])
...
...
builds/cmake/platform.hpp.in
View file @
1879b8ba
#ifndef __ZMQ_PLATFORM_HPP_INCLUDED__
#ifndef __ZMQ_PLATFORM_HPP_INCLUDED__
#define __ZMQ_PLATFORM_HPP_INCLUDED__
#define __ZMQ_PLATFORM_HPP_INCLUDED__
#cmakedefine ZMQ_FORCE_SELECT
#cmakedefine ZMQ_USE_KQUEUE
#cmakedefine ZMQ_FORCE_POLL
#cmakedefine ZMQ_USE_EPOLL
#cmakedefine ZMQ_FORCE_EPOLL
#cmakedefine ZMQ_USE_DEVPOLL
#cmakedefine ZMQ_FORCE_DEVPOLL
#cmakedefine ZMQ_USE_POLL
#cmakedefine ZMQ_FORCE_KQUEUE
#cmakedefine ZMQ_USE_SELECT
#cmakedefine ZMQ_FORCE_SELECT
#cmakedefine ZMQ_FORCE_POLL
#cmakedefine ZMQ_FORCE_MUTEXES
#cmakedefine ZMQ_FORCE_MUTEXES
...
...
builds/mingw32/Makefile.mingw32
View file @
1879b8ba
CC
=
gcc
CC
=
gcc
CFLAGS
=
-Wall
-Os
-g
-DDLL_EXPORT
-DFD_SETSIZE
=
1024
-I
.
CFLAGS
=
-Wall
-Os
-g
-DDLL_EXPORT
-DFD_SETSIZE
=
1024
-
DZMQ_USE_SELECT
-
I
.
LIBS
=
-lws2_32
LIBS
=
-lws2_32
OBJS
=
ctx.o reaper.o dist.o err.o
\
OBJS
=
ctx.o reaper.o dist.o err.o
\
...
...
builds/msvc/libzmq/libzmq.vcproj
View file @
1879b8ba
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
/>
/>
<Tool
<Tool
Name=
"VCCLCompilerTool"
Name=
"VCCLCompilerTool"
AdditionalOptions=
"-DDLL_EXPORT -DFD_SETSIZE=1024 -D_CRT_SECURE_NO_WARNINGS"
AdditionalOptions=
"-DDLL_EXPORT -DFD_SETSIZE=1024 -D
ZMQ_USE_SELECT; -D
_CRT_SECURE_NO_WARNINGS"
Optimization=
"0"
Optimization=
"0"
PreprocessorDefinitions=
"NOMINMAX"
PreprocessorDefinitions=
"NOMINMAX"
MinimalRebuild=
"true"
MinimalRebuild=
"true"
...
@@ -114,7 +114,7 @@
...
@@ -114,7 +114,7 @@
/>
/>
<Tool
<Tool
Name=
"VCCLCompilerTool"
Name=
"VCCLCompilerTool"
AdditionalOptions=
"-DDLL_EXPORT -DFD_SETSIZE=1024 -D_CRT_SECURE_NO_WARNINGS"
AdditionalOptions=
"-DDLL_EXPORT -DFD_SETSIZE=1024 -D
ZMQ_USE_SELECT; -D
_CRT_SECURE_NO_WARNINGS"
Optimization=
"2"
Optimization=
"2"
EnableIntrinsicFunctions=
"true"
EnableIntrinsicFunctions=
"true"
RuntimeLibrary=
"2"
RuntimeLibrary=
"2"
...
@@ -188,7 +188,7 @@
...
@@ -188,7 +188,7 @@
/>
/>
<Tool
<Tool
Name=
"VCCLCompilerTool"
Name=
"VCCLCompilerTool"
AdditionalOptions=
"-DZMQ_STATIC -DFD_SETSIZE=1024 -D_CRT_SECURE_NO_WARNINGS"
AdditionalOptions=
"-DZMQ_STATIC -DFD_SETSIZE=1024 -D
ZMQ_USE_SELECT; -D
_CRT_SECURE_NO_WARNINGS"
Optimization=
"0"
Optimization=
"0"
PreprocessorDefinitions=
"NOMINMAX"
PreprocessorDefinitions=
"NOMINMAX"
MinimalRebuild=
"true"
MinimalRebuild=
"true"
...
@@ -254,7 +254,7 @@
...
@@ -254,7 +254,7 @@
/>
/>
<Tool
<Tool
Name=
"VCCLCompilerTool"
Name=
"VCCLCompilerTool"
AdditionalOptions=
"-DZMQ_STATIC -DFD_SETSIZE=1024 -D_CRT_SECURE_NO_WARNINGS"
AdditionalOptions=
"-DZMQ_STATIC -DFD_SETSIZE=1024 -D
ZMQ_USE_SELECT; -D
_CRT_SECURE_NO_WARNINGS"
Optimization=
"2"
Optimization=
"2"
EnableIntrinsicFunctions=
"true"
EnableIntrinsicFunctions=
"true"
RuntimeLibrary=
"2"
RuntimeLibrary=
"2"
...
@@ -319,7 +319,7 @@
...
@@ -319,7 +319,7 @@
/>
/>
<Tool
<Tool
Name=
"VCCLCompilerTool"
Name=
"VCCLCompilerTool"
AdditionalOptions=
"-DDLL_EXPORT -DFD_SETSIZE=1024 -D_CRT_SECURE_NO_WARNINGS"
AdditionalOptions=
"-DDLL_EXPORT -DFD_SETSIZE=1024 -D
ZMQ_USE_SELECT; -D
_CRT_SECURE_NO_WARNINGS"
Optimization=
"2"
Optimization=
"2"
EnableIntrinsicFunctions=
"true"
EnableIntrinsicFunctions=
"true"
AdditionalIncludeDirectories=
"../../../../OpenPGM/include"
AdditionalIncludeDirectories=
"../../../../OpenPGM/include"
...
...
builds/msvc/properties/ZeroMQ.props
View file @
1879b8ba
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
<Command>
copy ..\platform.hpp ..\..\..\src
</Command>
<Command>
copy ..\platform.hpp ..\..\..\src
</Command>
</PreBuildEvent>
</PreBuildEvent>
<ClCompile>
<ClCompile>
<PreprocessorDefinitions>
_CRT_SECURE_NO_WARNINGS;DLL_EXPORT;FD_SETSIZE=1024;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<PreprocessorDefinitions>
_CRT_SECURE_NO_WARNINGS;DLL_EXPORT;FD_SETSIZE=1024;
ZMQ_USE_SELECT;
%(PreprocessorDefinitions)
</PreprocessorDefinitions>
</ClCompile>
</ClCompile>
<Link>
<Link>
<AdditionalDependencies>
Ws2_32.lib;Rpcrt4.lib;%(AdditionalDependencies)
</AdditionalDependencies>
<AdditionalDependencies>
Ws2_32.lib;Rpcrt4.lib;%(AdditionalDependencies)
</AdditionalDependencies>
...
...
builds/msvc/properties/ZeroMQ_Static.props
View file @
1879b8ba
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
<Command>
copy ..\platform.hpp ..\..\..\src
</Command>
<Command>
copy ..\platform.hpp ..\..\..\src
</Command>
</PreBuildEvent>
</PreBuildEvent>
<ClCompile>
<ClCompile>
<PreprocessorDefinitions>
_CRT_SECURE_NO_WARNINGS;ZMQ_STATIC;FD_SETSIZE=1024;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<PreprocessorDefinitions>
_CRT_SECURE_NO_WARNINGS;ZMQ_STATIC;FD_SETSIZE=1024;
ZMQ_USE_SELECT;
%(PreprocessorDefinitions)
</PreprocessorDefinitions>
</ClCompile>
</ClCompile>
<Lib>
<Lib>
<AdditionalDependencies>
Ws2_32.lib;Rpcrt4.lib;%(AdditionalDependencies)
</AdditionalDependencies>
<AdditionalDependencies>
Ws2_32.lib;Rpcrt4.lib;%(AdditionalDependencies)
</AdditionalDependencies>
...
...
src/poller.hpp
View file @
1879b8ba
...
@@ -22,59 +22,30 @@
...
@@ -22,59 +22,30 @@
#include "platform.hpp"
#include "platform.hpp"
#if defined ZMQ_FORCE_SELECT
#if defined ZMQ_USE_KQUEUE + defined ZMQ_USE_EPOLL \
#define ZMQ_USE_SELECT
+ defined ZMQ_USE_DEVPOLL + defined ZMQ_USE_POLL \
#include "select.hpp"
+ defined ZMQ_USE_SELECT > 1
#elif defined ZMQ_FORCE_POLL
#error More than one of the ZMQ_USE_* macros defined
#define ZMQ_USE_POLL
#endif
#include "poll.hpp"
#elif defined ZMQ_FORCE_EPOLL
#if defined ZMQ_USE_KQUEUE
#define ZMQ_USE_EPOLL
#include "epoll.hpp"
#elif defined ZMQ_FORCE_DEVPOLL
#define ZMQ_USE_DEVPOLL
#include "devpoll.hpp"
#elif defined ZMQ_FORCE_KQUEUE
#define ZMQ_USE_KQUEUE
#include "kqueue.hpp"
#include "kqueue.hpp"
#elif defined ZMQ_HAVE_LINUX
#elif defined ZMQ_USE_EPOLL
#define ZMQ_USE_EPOLL
#include "epoll.hpp"
#include "epoll.hpp"
#elif defined ZMQ_HAVE_WINDOWS
#elif defined ZMQ_USE_DEVPOLL
#define ZMQ_USE_SELECT
#include "select.hpp"
#elif defined ZMQ_HAVE_FREEBSD
#define ZMQ_USE_KQUEUE
#include "kqueue.hpp"
#elif defined ZMQ_HAVE_OPENBSD
#define ZMQ_USE_KQUEUE
#include "kqueue.hpp"
#elif defined ZMQ_HAVE_NETBSD
#define ZMQ_USE_KQUEUE
#include "kqueue.hpp"
#elif defined ZMQ_HAVE_SOLARIS
#define ZMQ_USE_DEVPOLL
#include "devpoll.hpp"
#include "devpoll.hpp"
#elif defined ZMQ_HAVE_OSX
#elif defined ZMQ_USE_POLL
#define ZMQ_USE_KQUEUE
#include "kqueue.hpp"
#elif defined ZMQ_HAVE_QNXNTO
#define ZMQ_USE_POLL
#include "poll.hpp"
#include "poll.hpp"
#elif defined ZMQ_HAVE_AIX
#elif defined ZMQ_USE_SELECT
#define ZMQ_USE_POLL
#include "poll.hpp"
#elif defined ZMQ_HAVE_HPUX
#define ZMQ_USE_DEVPOLL
#include "devpoll.hpp"
#elif defined ZMQ_HAVE_OPENVMS
#define ZMQ_USE_SELECT
#include "select.hpp"
#elif defined ZMQ_HAVE_CYGWIN
#define ZMQ_USE_SELECT
#include "select.hpp"
#include "select.hpp"
#else
#else
#error Unsupported platform
#error None of the ZMQ_USE_* macros defined
#endif
#if defined ZMQ_USE_SELECT
#define ZMQ_POLL_BASED_ON_SELECT
#else
#define ZMQ_POLL_BASED_ON_POLL
#endif
#endif
#endif
#endif
src/proxy.cpp
View file @
1879b8ba
...
@@ -18,25 +18,10 @@
...
@@ -18,25 +18,10 @@
*/
*/
#include <stddef.h>
#include <stddef.h>
#include "p
latform
.hpp"
#include "p
oller
.hpp"
#include "proxy.hpp"
#include "proxy.hpp"
#include "likely.hpp"
#include "likely.hpp"
#if defined ZMQ_FORCE_SELECT
#define ZMQ_POLL_BASED_ON_SELECT
#elif defined ZMQ_FORCE_POLL
#define ZMQ_POLL_BASED_ON_POLL
#elif defined ZMQ_HAVE_LINUX || defined ZMQ_HAVE_FREEBSD ||\
defined ZMQ_HAVE_OPENBSD || defined ZMQ_HAVE_SOLARIS ||\
defined ZMQ_HAVE_OSX || defined ZMQ_HAVE_QNXNTO ||\
defined ZMQ_HAVE_HPUX || defined ZMQ_HAVE_AIX ||\
defined ZMQ_HAVE_NETBSD
#define ZMQ_POLL_BASED_ON_POLL
#elif defined ZMQ_HAVE_WINDOWS || defined ZMQ_HAVE_OPENVMS ||\
defined ZMQ_HAVE_CYGWIN
#define ZMQ_POLL_BASED_ON_SELECT
#endif
// On AIX platform, poll.h has to be included first to get consistent
// On AIX platform, poll.h has to be included first to get consistent
// definition of pollfd structure (AIX uses 'reqevents' and 'retnevents'
// definition of pollfd structure (AIX uses 'reqevents' and 'retnevents'
// instead of 'events' and 'revents' and defines macros to map from POSIX-y
// instead of 'events' and 'revents' and defines macros to map from POSIX-y
...
...
src/signaler.cpp
View file @
1879b8ba
...
@@ -17,30 +17,15 @@
...
@@ -17,30 +17,15 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
*/
#include "platform.hpp"
#include "poller.hpp"
#if defined ZMQ_FORCE_SELECT
#define ZMQ_SIGNALER_WAIT_BASED_ON_SELECT
#elif defined ZMQ_FORCE_POLL
#define ZMQ_SIGNALER_WAIT_BASED_ON_POLL
#elif defined ZMQ_HAVE_LINUX || defined ZMQ_HAVE_FREEBSD ||\
defined ZMQ_HAVE_OPENBSD || defined ZMQ_HAVE_SOLARIS ||\
defined ZMQ_HAVE_OSX || defined ZMQ_HAVE_QNXNTO ||\
defined ZMQ_HAVE_HPUX || defined ZMQ_HAVE_AIX ||\
defined ZMQ_HAVE_NETBSD
#define ZMQ_SIGNALER_WAIT_BASED_ON_POLL
#elif defined ZMQ_HAVE_WINDOWS || defined ZMQ_HAVE_OPENVMS ||\
defined ZMQ_HAVE_CYGWIN
#define ZMQ_SIGNALER_WAIT_BASED_ON_SELECT
#endif
// On AIX, poll.h has to be included before zmq.h to get consistent
// On AIX, poll.h has to be included before zmq.h to get consistent
// definition of pollfd structure (AIX uses 'reqevents' and 'retnevents'
// definition of pollfd structure (AIX uses 'reqevents' and 'retnevents'
// instead of 'events' and 'revents' and defines macros to map from POSIX-y
// instead of 'events' and 'revents' and defines macros to map from POSIX-y
// names to AIX-specific names).
// names to AIX-specific names).
#if defined ZMQ_
SIGNALER_WAIT
_BASED_ON_POLL
#if defined ZMQ_
POLL
_BASED_ON_POLL
#include <poll.h>
#include <poll.h>
#elif defined ZMQ_
SIGNALER_WAIT
_BASED_ON_SELECT
#elif defined ZMQ_
POLL
_BASED_ON_SELECT
#if defined ZMQ_HAVE_WINDOWS
#if defined ZMQ_HAVE_WINDOWS
#include "windows.hpp"
#include "windows.hpp"
#elif defined ZMQ_HAVE_HPUX
#elif defined ZMQ_HAVE_HPUX
...
@@ -166,7 +151,7 @@ int zmq::signaler_t::wait (int timeout_)
...
@@ -166,7 +151,7 @@ int zmq::signaler_t::wait (int timeout_)
}
}
#endif
#endif
#ifdef ZMQ_
SIGNALER_WAIT
_BASED_ON_POLL
#ifdef ZMQ_
POLL
_BASED_ON_POLL
struct
pollfd
pfd
;
struct
pollfd
pfd
;
pfd
.
fd
=
r
;
pfd
.
fd
=
r
;
...
@@ -194,7 +179,7 @@ int zmq::signaler_t::wait (int timeout_)
...
@@ -194,7 +179,7 @@ int zmq::signaler_t::wait (int timeout_)
zmq_assert
(
pfd
.
revents
&
POLLIN
);
zmq_assert
(
pfd
.
revents
&
POLLIN
);
return
0
;
return
0
;
#elif defined ZMQ_
SIGNALER_WAIT
_BASED_ON_SELECT
#elif defined ZMQ_
POLL
_BASED_ON_SELECT
fd_set
fds
;
fd_set
fds
;
FD_ZERO
(
&
fds
);
FD_ZERO
(
&
fds
);
...
@@ -516,11 +501,3 @@ int zmq::signaler_t::make_fdpair (fd_t *r_, fd_t *w_)
...
@@ -516,11 +501,3 @@ int zmq::signaler_t::make_fdpair (fd_t *r_, fd_t *w_)
}
}
#endif
#endif
}
}
#if defined ZMQ_SIGNALER_WAIT_BASED_ON_SELECT
#undef ZMQ_SIGNALER_WAIT_BASED_ON_SELECT
#endif
#if defined ZMQ_SIGNALER_WAIT_BASED_ON_POLL
#undef ZMQ_SIGNALER_WAIT_BASED_ON_POLL
#endif
src/zmq.cpp
View file @
1879b8ba
...
@@ -18,22 +18,7 @@
...
@@ -18,22 +18,7 @@
*/
*/
#define ZMQ_TYPE_UNSAFE
#define ZMQ_TYPE_UNSAFE
#include "platform.hpp"
#include "poller.hpp"
#if defined ZMQ_FORCE_SELECT
#define ZMQ_POLL_BASED_ON_SELECT
#elif defined ZMQ_FORCE_POLL
#define ZMQ_POLL_BASED_ON_POLL
#elif defined ZMQ_HAVE_LINUX || defined ZMQ_HAVE_FREEBSD ||\
defined ZMQ_HAVE_OPENBSD || defined ZMQ_HAVE_SOLARIS ||\
defined ZMQ_HAVE_OSX || defined ZMQ_HAVE_QNXNTO ||\
defined ZMQ_HAVE_HPUX || defined ZMQ_HAVE_AIX ||\
defined ZMQ_HAVE_NETBSD
#define ZMQ_POLL_BASED_ON_POLL
#elif defined ZMQ_HAVE_WINDOWS || defined ZMQ_HAVE_OPENVMS ||\
defined ZMQ_HAVE_CYGWIN
#define ZMQ_POLL_BASED_ON_SELECT
#endif
// On AIX platform, poll.h has to be included first to get consistent
// On AIX platform, poll.h has to be included first to get consistent
// definition of pollfd structure (AIX uses 'reqevents' and 'retnevents'
// definition of pollfd structure (AIX uses 'reqevents' and 'retnevents'
...
@@ -1009,13 +994,6 @@ int zmq_poll (zmq_pollitem_t *items_, int nitems_, long timeout_)
...
@@ -1009,13 +994,6 @@ int zmq_poll (zmq_pollitem_t *items_, int nitems_, long timeout_)
#endif
#endif
}
}
#if defined ZMQ_POLL_BASED_ON_SELECT
#undef ZMQ_POLL_BASED_ON_SELECT
#endif
#if defined ZMQ_POLL_BASED_ON_POLL
#undef ZMQ_POLL_BASED_ON_POLL
#endif
// The proxy functionality
// The proxy functionality
int
zmq_proxy
(
void
*
frontend_
,
void
*
backend_
,
void
*
capture_
)
int
zmq_proxy
(
void
*
frontend_
,
void
*
backend_
,
void
*
capture_
)
...
...
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