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
eee78807
Commit
eee78807
authored
Sep 21, 2016
by
hnwyllmm@126.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move the `pollset` to the position between `devpoll` and `poll`
parent
c964b7cf
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
36 deletions
+36
-36
CMakeLists.txt
CMakeLists.txt
+11
-11
acinclude.m4
acinclude.m4
+25
-25
No files found.
CMakeLists.txt
View file @
eee78807
...
@@ -77,7 +77,7 @@ if (WITH_MILITANT)
...
@@ -77,7 +77,7 @@ if (WITH_MILITANT)
endif
()
endif
()
set
(
POLLER
""
CACHE STRING
"Choose polling system. valid values are
set
(
POLLER
""
CACHE STRING
"Choose polling system. valid values are
kqueue,
pollset, epoll, devpoll
, poll or select [default=autodetect]"
)
kqueue,
epoll, devpoll, pollset
, poll or select [default=autodetect]"
)
include
(
CheckFunctionExists
)
include
(
CheckFunctionExists
)
include
(
CheckTypeSize
)
include
(
CheckTypeSize
)
...
@@ -91,15 +91,6 @@ if (POLLER STREQUAL "")
...
@@ -91,15 +91,6 @@ if (POLLER STREQUAL "")
endif
()
endif
()
endif
()
endif
()
if
(
POLLER STREQUAL
""
)
set
(
CMAKE_REQUIRED_INCLUDES sys/pollset.h
)
check_function_exists
(
pollset_create HAVE_POLLSET
)
set
(
CMAKE_REQUIRED_INCLUDES
)
if
(
HAVE_POLLSET
)
set
(
POLLER
"pollset"
)
endif
()
endif
()
if
(
POLLER STREQUAL
""
)
if
(
POLLER STREQUAL
""
)
set
(
CMAKE_REQUIRED_INCLUDES sys/epoll.h
)
set
(
CMAKE_REQUIRED_INCLUDES sys/epoll.h
)
check_function_exists
(
epoll_create HAVE_EPOLL
)
check_function_exists
(
epoll_create HAVE_EPOLL
)
...
@@ -118,6 +109,15 @@ if (POLLER STREQUAL "")
...
@@ -118,6 +109,15 @@ if (POLLER STREQUAL "")
endif
()
endif
()
endif
()
endif
()
if
(
POLLER STREQUAL
""
)
set
(
CMAKE_REQUIRED_INCLUDES sys/pollset.h
)
check_function_exists
(
pollset_create HAVE_POLLSET
)
set
(
CMAKE_REQUIRED_INCLUDES
)
if
(
HAVE_POLLSET
)
set
(
POLLER
"pollset"
)
endif
()
endif
()
if
(
POLLER STREQUAL
""
)
if
(
POLLER STREQUAL
""
)
set
(
CMAKE_REQUIRED_INCLUDES poll.h
)
set
(
CMAKE_REQUIRED_INCLUDES poll.h
)
check_function_exists
(
poll HAVE_POLL
)
check_function_exists
(
poll HAVE_POLL
)
...
@@ -145,9 +145,9 @@ if (POLLER STREQUAL "")
...
@@ -145,9 +145,9 @@ if (POLLER STREQUAL "")
endif
()
endif
()
if
(
POLLER STREQUAL
"kqueue"
if
(
POLLER STREQUAL
"kqueue"
OR POLLER STREQUAL
"pollset"
OR POLLER STREQUAL
"epoll"
OR POLLER STREQUAL
"epoll"
OR POLLER STREQUAL
"devpoll"
OR POLLER STREQUAL
"devpoll"
OR POLLER STREQUAL
"pollset"
OR POLLER STREQUAL
"poll"
OR POLLER STREQUAL
"poll"
OR POLLER STREQUAL
"select"
)
OR POLLER STREQUAL
"select"
)
message
(
STATUS
"Detected
${
POLLER
}
polling method"
)
message
(
STATUS
"Detected
${
POLLER
}
polling method"
)
...
...
acinclude.m4
View file @
eee78807
...
@@ -794,22 +794,6 @@ kqueue();
...
@@ -794,22 +794,6 @@ kqueue();
)
)
}])
}])
dnl ################################################################################
dnl # LIBZMQ_CHECK_POLLER_POLLSET([action-if-found], [action-if-not-found]) #
dnl # Checks pollset polling system #
dnl ################################################################################
AC_DEFUN([LIBZMQ_CHECK_POLLER_POLLSET], [{
AC_LINK_IFELSE([
AC_LANG_PROGRAM([
#include <sys/poll.h>
#include <sys/pollset.h>
],[[
pollset_t ps = pollset_create(-1);
]])],
[$1], [$2]
)
}])
dnl ################################################################################
dnl ################################################################################
dnl # LIBZMQ_CHECK_POLLER_EPOLL_RUN([action-if-found], [action-if-not-found]) #
dnl # LIBZMQ_CHECK_POLLER_EPOLL_RUN([action-if-found], [action-if-not-found]) #
dnl # Checks epoll polling system can actually run #
dnl # Checks epoll polling system can actually run #
...
@@ -855,6 +839,22 @@ int fd = open("/dev/poll", O_RDWR);
...
@@ -855,6 +839,22 @@ int fd = open("/dev/poll", O_RDWR);
)
)
}])
}])
dnl ################################################################################
dnl # LIBZMQ_CHECK_POLLER_POLLSET([action-if-found], [action-if-not-found]) #
dnl # Checks pollset polling system #
dnl ################################################################################
AC_DEFUN([LIBZMQ_CHECK_POLLER_POLLSET], [{
AC_LINK_IFELSE([
AC_LANG_PROGRAM([
#include <sys/poll.h>
#include <sys/pollset.h>
],[[
pollset_t ps = pollset_create(-1);
]])],
[$1], [$2]
)
}])
dnl ################################################################################
dnl ################################################################################
dnl # LIBZMQ_CHECK_POLLER_POLL([action-if-found], [action-if-not-found]) #
dnl # LIBZMQ_CHECK_POLLER_POLL([action-if-found], [action-if-not-found]) #
dnl # Checks poll polling system #
dnl # Checks poll polling system #
...
@@ -908,7 +908,7 @@ AC_DEFUN([LIBZMQ_CHECK_POLLER], [{
...
@@ -908,7 +908,7 @@ AC_DEFUN([LIBZMQ_CHECK_POLLER], [{
# Allow user to override poller autodetection
# Allow user to override poller autodetection
AC_ARG_WITH([poller],
AC_ARG_WITH([poller],
[AS_HELP_STRING([--with-poller],
[AS_HELP_STRING([--with-poller],
[choose polling system manually. Valid values are 'kqueue', '
pollset', 'epoll', 'devpoll
', 'poll', 'select', or 'auto'. [default=auto]])])
[choose polling system manually. Valid values are 'kqueue', '
epoll', 'devpoll', 'pollset
', 'poll', 'select', or 'auto'. [default=auto]])])
if test "x$with_poller" == "x"; then
if test "x$with_poller" == "x"; then
pollers=auto
pollers=auto
...
@@ -917,7 +917,7 @@ AC_DEFUN([LIBZMQ_CHECK_POLLER], [{
...
@@ -917,7 +917,7 @@ AC_DEFUN([LIBZMQ_CHECK_POLLER], [{
fi
fi
if test "$pollers" == "auto"; then
if test "$pollers" == "auto"; then
# We search for pollers in this order
# We search for pollers in this order
pollers="kqueue
pollset epoll devpoll
poll select"
pollers="kqueue
epoll devpoll pollset
poll select"
fi
fi
# try to find suitable polling system. the order of testing is:
# try to find suitable polling system. the order of testing is:
...
@@ -932,13 +932,6 @@ AC_DEFUN([LIBZMQ_CHECK_POLLER], [{
...
@@ -932,13 +932,6 @@ AC_DEFUN([LIBZMQ_CHECK_POLLER], [{
poller_found=1
poller_found=1
])
])
;;
;;
pollset)
LIBZMQ_CHECK_POLLER_POLLSET([
AC_MSG_NOTICE([Using 'pollset' polling system])
AC_DEFINE(ZMQ_USE_POLLSET, 1, [Use 'pollset' polling system])
poller_found=1
])
;;
epoll)
epoll)
LIBZMQ_CHECK_POLLER_EPOLL([
LIBZMQ_CHECK_POLLER_EPOLL([
AC_MSG_NOTICE([Using 'epoll' polling system])
AC_MSG_NOTICE([Using 'epoll' polling system])
...
@@ -953,6 +946,13 @@ AC_DEFUN([LIBZMQ_CHECK_POLLER], [{
...
@@ -953,6 +946,13 @@ AC_DEFUN([LIBZMQ_CHECK_POLLER], [{
poller_found=1
poller_found=1
])
])
;;
;;
pollset)
LIBZMQ_CHECK_POLLER_POLLSET([
AC_MSG_NOTICE([Using 'pollset' polling system])
AC_DEFINE(ZMQ_USE_POLLSET, 1, [Use 'pollset' polling system])
poller_found=1
])
;;
poll)
poll)
LIBZMQ_CHECK_POLLER_POLL([
LIBZMQ_CHECK_POLLER_POLL([
AC_MSG_NOTICE([Using 'poll' polling system])
AC_MSG_NOTICE([Using 'poll' polling system])
...
...
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