Commit c2bb6504 authored by Jason Madden's avatar Jason Madden Committed by GitHub

Merge pull request #1650 from gevent/issue1648

Set EV_USE_REALTIME, EV_USE_MONOTONIC and EV_USE_FLOOR.
parents d817b3c3 e44f9571
......@@ -88,7 +88,17 @@ def build_extension():
# libev watchers that we don't use currently:
('EV_CLEANUP_ENABLE', '0'),
('EV_EMBED_ENABLE', '0'),
("EV_PERIODIC_ENABLE", '0')
("EV_PERIODIC_ENABLE", '0'),
# Time keeping. If possible, use the realtime and/or monotonic
# clocks. On Linux, this can reduce the number of observable syscalls.
# On older linux, such as the version in manylinux2010, this requires
# linking to lib rt. We handle this in make-manylinux. Newer versions
# generally don't need that.
("EV_USE_REALTIME", "1"),
("EV_USE_MONOTONIC", "1"),
# use the builtin floor() function. Every modern platform should
# have this, right?
("EV_USE_FLOOR", "1"),
]
CORE.configure = configure_libev
if os.environ.get('GEVENTSETUP_EV_VERIFY') is not None:
......
The embedded libev is now asked to detect the availability of
``clock_gettime`` and use the realtime and/or monotonic clocks, if
they are available.
On Linux, this can reduce the number of system calls libev makes.
Originally provided by Josh Snyder.
......@@ -34,7 +34,7 @@ export CCACHE_DIR="/ccache"
# Disable some warnings produced by libev especially and also some Cython generated code.
# Note that changing the value of these variables invalidates configure caches
export CFLAGS="-Ofast -pipe -Wno-strict-aliasing -Wno-comment -Wno-unused-value -Wno-unused-but-set-variable -Wno-sign-compare -Wno-parentheses -Wno-unused-function -Wno-tautological-compare -Wno-strict-prototypes"
export LDFLAGS="-lrt" # Needed for clock_gettime libc support on this version.
if [ -d /gevent -a -d /opt/python ]; then
# Running inside docker
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment