comparison auto/os/features @ 3052:6060225e9261

FreeBSD and Linux AIO support
author Igor Sysoev <igor@sysoev.ru>
date Fri, 28 Aug 2009 08:12:35 +0000
parents 759ff3e380e3
children e1e290965ed1
comparison
equal deleted inserted replaced
3051:26dfc0fa22c8 3052:6060225e9261
272 272
273 if [ $ngx_found = yes ]; then 273 if [ $ngx_found = yes ]; then
274 CORE_LIBS="$CORE_LIBS -lrt" 274 CORE_LIBS="$CORE_LIBS -lrt"
275 fi 275 fi
276 fi 276 fi
277
278
279 if [ $NGX_FILE_AIO = YES ]; then
280 ngx_feature="kqueue AIO support"
281 ngx_feature_name="NGX_HAVE_FILE_AIO"
282 ngx_feature_run=no
283 ngx_feature_incs="#include <aio.h>"
284 ngx_feature_path=
285 ngx_feature_libs=
286 ngx_feature_test="int n; struct aiocb iocb;
287 iocb.aio_sigevent.sigev_notify = SIGEV_KEVENT;
288 n = aio_read(&iocb)"
289 . auto/feature
290
291 if [ $ngx_found = yes ]; then
292 CORE_SRCS="$CORE_SRCS $FILE_AIO_SRCS"
293 fi
294 fi
295
296
297 if [ $NGX_FILE_AIO = YES ]; then
298 ngx_feature="Linux AIO support"
299 ngx_feature_name="NGX_HAVE_FILE_AIO"
300 ngx_feature_run=no
301 ngx_feature_incs="#include <linux/aio_abi.h>
302 #include <sys/syscall.h>"
303 ngx_feature_path=
304 ngx_feature_libs=
305 ngx_feature_test="int n = SYS_eventfd;
306 struct iocb iocb;
307 iocb.aio_lio_opcode = IOCB_CMD_PREAD;
308 iocb.aio_flags = IOCB_FLAG_RESFD;
309 iocb.aio_resfd = -1;"
310 . auto/feature
311
312 if [ $ngx_found = yes ]; then
313 have=NGX_HAVE_EVENTFD . auto/have
314 CORE_SRCS="$CORE_SRCS $LINUX_AIO_SRCS"
315 fi
316 fi