deleted QSE_FIO_NOCACHE
This commit is contained in:
parent
1e36d2c141
commit
1869cde2dc
@ -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
|
||||||
|
@ -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;
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user