deleted QSE_FIO_NOCACHE

This commit is contained in:
hyung-hwan 2011-11-10 15:45:10 +00:00
parent 1e36d2c141
commit 1869cde2dc
3 changed files with 5 additions and 9 deletions

View File

@ -61,8 +61,7 @@ enum qse_fio_open_flag_t
/* hints to OS. harmless(no effect) when used on unsupported platforms */ /* hints to OS. harmless(no effect) when used on unsupported platforms */
QSE_FIO_RANDOM = (1 << 26), /* hint that access be random */ QSE_FIO_RANDOM = (1 << 26), /* hint that access be random */
QSE_FIO_SEQUENTIAL = (1 << 27), /* hint that access is sequential */ QSE_FIO_SEQUENTIAL = (1 << 27) /* hint that access is sequential */
QSE_FIO_NOCACHE = (1 << 28) /* no system I/O cache */
}; };
enum qse_fio_std_t enum qse_fio_std_t

View File

@ -47,7 +47,10 @@ enum qse_sio_open_flag_t
QSE_SIO_NOFOLLOW = QSE_FIO_NOFOLLOW, QSE_SIO_NOFOLLOW = QSE_FIO_NOFOLLOW,
QSE_SIO_NOSHRD = QSE_FIO_NOSHRD, QSE_SIO_NOSHRD = QSE_FIO_NOSHRD,
QSE_SIO_NOSHWR = QSE_FIO_NOSHWR QSE_SIO_NOSHWR = QSE_FIO_NOSHWR,
QSE_SIO_RANDOM = QSE_FIO_RANDOM,
QSE_SIO_SEQUENTIAL = QSE_FIO_SEQUENTIAL
}; };
typedef qse_fio_off_t qse_sio_pos_t; typedef qse_fio_off_t qse_sio_pos_t;

View File

@ -155,8 +155,6 @@ int qse_fio_init (
flag_and_attr |= FILE_FLAG_RANDOM_ACCESS; flag_and_attr |= FILE_FLAG_RANDOM_ACCESS;
if (flags & QSE_FIO_SEQUENTIAL) if (flags & QSE_FIO_SEQUENTIAL)
flag_and_attr |= FILE_FLAG_SEQUENTIAL_SCAN; flag_and_attr |= FILE_FLAG_SEQUENTIAL_SCAN;
if (flags & QSE_FIO_NOCACHE)
flag_and_attr |= FILE_FLAG_NO_BUFFERING;
handle = CreateFile ( handle = CreateFile (
path, desired_access, share_mode, path, desired_access, share_mode,
@ -380,10 +378,6 @@ int qse_fio_init (
if (flags & QSE_FIO_SEQUENTIAL) if (flags & QSE_FIO_SEQUENTIAL)
posix_fadvise (handle, 0, 0, POSIX_FADV_SEQUENTIAL); posix_fadvise (handle, 0, 0, POSIX_FADV_SEQUENTIAL);
#endif #endif
#if defined(POSIX_FADV_DONTNEED)
if (flags & QSE_FIO_NOCACHE)
posix_fadvise (handle, 0, 0, POSIX_FADV_DONTNEED);
#endif
#endif #endif