… | |
… | |
138 | |
138 | |
139 | 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 |
140 | 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 |
141 | safe fallback to other methods when it cannot be used. |
141 | safe fallback to other methods when it cannot be used. |
142 | |
142 | |
143 | 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 |
144 | '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: |
145 | |
148 | |
146 | NetBSD: partially working in at least 3.1. Yeah! :) |
149 | NetBSD: partially working in at least 3.1. Yeah! :) |
147 | FreeBSD: broken on at least 6.2-STABLE, |
150 | FreeBSD: broken on at least 6.2-STABLE, |
148 | sockets *likely* work, ptys definitely don't. |
151 | sockets *likely* work, ptys definitely don't. |
149 | OpenBSD: reports indicate that it likely doesn't work |
152 | OpenBSD: reports indicate that it likely doesn't work |
… | |
… | |
198 | EOF |
201 | EOF |
199 | |
202 | |
200 | my $can_inotify = -e "/usr/include/sys/inotify.h"; |
203 | my $can_inotify = -e "/usr/include/sys/inotify.h"; |
201 | |
204 | |
202 | $DEFINE .= " -DEV_USE_INOTIFY=" . (0 + (prompt ("Enable inotify support (y/n)?", $can_inotify ? "y" : "n") =~ /[yY]/)); |
205 | $DEFINE .= " -DEV_USE_INOTIFY=" . (0 + (prompt ("Enable inotify support (y/n)?", $can_inotify ? "y" : "n") =~ /[yY]/)); |
|
|
206 | |
|
|
207 | print <<EOF; |
|
|
208 | |
|
|
209 | *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** |
|
|
210 | |
|
|
211 | |
|
|
212 | Another useful bit of functionality is the Linux eventfd, which is useful |
|
|
213 | for faster signal handling (don't care) and intra-thread communications |
|
|
214 | (more relevant). Kernel support for this will be probed at runtime, but |
|
|
215 | your libc must contain the necessary wrapper. Glibc 2.7 and later should |
|
|
216 | have this wrapper. |
|
|
217 | |
|
|
218 | EOF |
|
|
219 | |
|
|
220 | $DEFINE .= " -DEV_USE_EVENTFD=" . (0 + (prompt ("Enable linux eventfd support (y/n)?", (-e "/usr/include/sys/eventfd.h") || $ENV{EV_EVENTFD} ? "y" : "n") =~ /[yY]/)); |
203 | |
221 | |
204 | print <<EOF; |
222 | print <<EOF; |
205 | |
223 | |
206 | *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** |
224 | *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** |
207 | |
225 | |
… | |
… | |
232 | PM => { |
250 | PM => { |
233 | 'EV.pm' => '$(INST_LIBDIR)/EV.pm', |
251 | 'EV.pm' => '$(INST_LIBDIR)/EV.pm', |
234 | 'EV/EVAPI.h' => '$(INST_LIBDIR)/EV/EVAPI.h', |
252 | 'EV/EVAPI.h' => '$(INST_LIBDIR)/EV/EVAPI.h', |
235 | 'EV/MakeMaker.pm' => '$(INST_LIBDIR)/EV/MakeMaker.pm', |
253 | 'EV/MakeMaker.pm' => '$(INST_LIBDIR)/EV/MakeMaker.pm', |
236 | 'libev/ev.h' => '$(INST_LIBDIR)/EV/ev.h', |
254 | 'libev/ev.h' => '$(INST_LIBDIR)/EV/ev.h', |
|
|
255 | 'libev/ev.pod' => '$(INST_LIBDIR)/EV/libev.pod', |
237 | }, |
256 | }, |
|
|
257 | MAN3PODS => { |
|
|
258 | 'EV.pm' => '$(INST_MAN3DIR)/EV.$(MAN3EXT)', |
|
|
259 | 'EV/MakeMaker.pm' => '$(INST_MAN3DIR)/EV::MakeMaker.$(MAN3EXT)', |
|
|
260 | 'libev/ev.pod' => '$(INST_MAN3DIR)/EV::libev.$(MAN3EXT)', |
|
|
261 | }, |
238 | ); |
262 | ); |
239 | |
263 | |
240 | |
264 | |