Mercurial > hg > nginx-quic
diff src/os/unix/ngx_files.h @ 2129:25add486e7aa
directio
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 30 Jul 2008 12:34:04 +0000 |
parents | 5e954395a15e |
children | 56964e5b77db |
line wrap: on
line diff
--- a/src/os/unix/ngx_files.h +++ b/src/os/unix/ngx_files.h @@ -189,4 +189,22 @@ ngx_err_t ngx_unlock_fd(ngx_fd_t fd); #define ngx_unlock_fd_n "fcntl(F_SETLK, F_UNLCK)" +#if (NGX_HAVE_O_DIRECT) + +ngx_int_t ngx_directio(ngx_fd_t fd); +#define ngx_directio_n "fcntl(O_DIRECT)" + +#elif (NGX_HAVE_F_NOCACHE) + +#define ngx_directio(fd) fcntl(fd, F_NOCACHE, 1) +#define ngx_directio_n "fcntl(F_NOCACHE)" + +#else + +#define ngx_directio(fd) 0 +#define ngx_directio_n "ngx_directio_n" + +#endif + + #endif /* _NGX_FILES_H_INCLUDED_ */