… | |
… | |
38 | POSIX optionally offers support for a monotonic clock source. EV |
38 | POSIX optionally offers support for a monotonic clock source. EV |
39 | can take advantage of this clock source to detect time jumps |
39 | can take advantage of this clock source to detect time jumps |
40 | reliably. Unfortunately, some systems are bound to be broken, so you can |
40 | reliably. Unfortunately, some systems are bound to be broken, so you can |
41 | disable this here: you can completely disable the detection and use of |
41 | disable this here: you can completely disable the detection and use of |
42 | the monotonic clock by answering 'n' here. Support for this clock type |
42 | the monotonic clock by answering 'n' here. Support for this clock type |
43 | will otherwise be autodetected at both compile- and runtime. |
43 | will otherwise be autodetected at both compile- and runtime. (this setting |
|
|
44 | currently affects the use of nanosleep over select as well). |
44 | |
45 | |
45 | EOF |
46 | EOF |
46 | |
47 | |
47 | $DEFINE .= " -DEV_USE_MONOTONIC=" . (0 + (prompt ("Enable optional support for CLOCK_MONOTONIC (y/n)?", "y") =~ /[yY]/)); |
48 | $DEFINE .= " -DEV_USE_MONOTONIC=" . (0 + (prompt ("Enable optional support for CLOCK_MONOTONIC (y/n)?", "y") =~ /[yY]/)); |
48 | |
49 | |
… | |
… | |
137 | |
138 | |
138 | Similarly to the epoll backend above, EV can take advantage of kqueue on |
139 | Similarly to the epoll backend above, EV can take advantage of kqueue on |
139 | many BSD systems. Support for kqueue will be detected at runtime, with a |
140 | many BSD systems. Support for kqueue will be detected at runtime, with a |
140 | safe fallback to other methods when it cannot be used. |
141 | safe fallback to other methods when it cannot be used. |
141 | |
142 | |
142 | Note that kqueue is broken on most operating systems, so it defaults to |
143 | Note that kqueue is broken on most operating systems, so by default it |
143 | 'n' on everything but netbsd. Here is what we know: |
144 | won't be used on many platforms, but you can still create your own event |
|
|
145 | loop with qkueue backend. |
|
|
146 | |
|
|
147 | Here is what we know: |
144 | |
148 | |
145 | NetBSD: partially working in at least 3.1. Yeah! :) |
149 | NetBSD: partially working in at least 3.1. Yeah! :) |
146 | FreeBSD: broken on at least 6.2-STABLE, |
150 | FreeBSD: broken on at least 6.2-STABLE, |
147 | sockets *likely* work, ptys definitely don't. |
151 | sockets *likely* work, ptys definitely don't. |
148 | OpenBSD: reports indicate that it likely doesn't work |
152 | OpenBSD: reports indicate that it likely doesn't work |
… | |
… | |
216 | SUFFIX => '.gz', |
220 | SUFFIX => '.gz', |
217 | }, |
221 | }, |
218 | depend => { |
222 | depend => { |
219 | "EV.c" => "EV/EVAPI.h " |
223 | "EV.c" => "EV/EVAPI.h " |
220 | . "libev/ev.c libev/ev.h libev/ev_epoll.c libev/ev_select.c libev/ev_kqueue.c libev/ev_poll.c " |
224 | . "libev/ev.c libev/ev.h libev/ev_epoll.c libev/ev_select.c libev/ev_kqueue.c libev/ev_poll.c " |
221 | . "libev/event.h libev/event.c libev/ev_vars.h libev/ev_wrap.h", |
225 | . "libev/ev_vars.h libev/ev_wrap.h", |
222 | }, |
226 | }, |
223 | INC => "-Ilibev", |
227 | INC => "-Ilibev", |
224 | DEFINE => "$DEFINE", |
228 | DEFINE => "$DEFINE", |
225 | NAME => "EV", |
229 | NAME => "EV", |
226 | LIBS => [$LIBS], |
230 | LIBS => [$LIBS], |