diff options
author | Igor Sysoev <igor@sysoev.ru> | 2008-07-30 12:34:04 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2008-07-30 12:34:04 +0000 |
commit | 385af286421e983f744f7f5d339b8060ccd36302 (patch) | |
tree | 81c46d0dad40506cc3a331c6ffaf454da85a0177 /src/os/unix/ngx_files.h | |
parent | 749449097847cc3bee9e4e3966122a94149b755b (diff) | |
download | nginx-385af286421e983f744f7f5d339b8060ccd36302.tar.gz nginx-385af286421e983f744f7f5d339b8060ccd36302.zip |
directio
Diffstat (limited to 'src/os/unix/ngx_files.h')
-rw-r--r-- | src/os/unix/ngx_files.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/os/unix/ngx_files.h b/src/os/unix/ngx_files.h index 0c080c494..62af63bce 100644 --- 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_ */ |