#include <mono/io-layer/wapi.h>
#include <mono/io-layer/wapi-private.h>
#include <mono/io-layer/io-private.h>
-#include <mono/io-layer/timefuncs-private.h>
+#include <mono/io-layer/timefuncs.h>
#include <mono/io-layer/io-portability.h>
#include <mono/io-layer/io-trace.h>
#include <mono/utils/strenc.h>
#include <mono/utils/mono-once.h>
#include <mono/utils/mono-logger-internals.h>
-#include <mono/utils/w32handle.h>
+#include <mono/metadata/w32handle.h>
/*
* If SHM is disabled, this will point to a hash of _WapiFileShare structures, otherwise
if (attrs & FILE_FLAG_RANDOM_ACCESS)
posix_fadvise (fd, 0, 0, POSIX_FADV_RANDOM);
#endif
-
+
+ #ifdef F_RDAHEAD
+ if (attrs & FILE_FLAG_SEQUENTIAL_SCAN)
+ fcntl(fd, F_RDAHEAD, 1);
+ #endif
+
#ifndef S_ISFIFO
#define S_ISFIFO(m) ((m & S_IFIFO) != 0)
#endif
gunichar2 *utf16_basename;
time_t create_time;
glong bytes;
- int thr_ret;
gboolean ret = FALSE;
ok=mono_w32handle_lookup (handle, MONO_W32HANDLE_FIND,
return(FALSE);
}
- thr_ret = mono_w32handle_lock_handle (handle);
- g_assert (thr_ret == 0);
+ mono_w32handle_lock_handle (handle);
retry:
if (find_handle->count >= find_handle->num) {
g_free (utf16_basename);
cleanup:
- thr_ret = mono_w32handle_unlock_handle (handle);
- g_assert (thr_ret == 0);
+ mono_w32handle_unlock_handle (handle);
return(ret);
}
{
struct _WapiHandle_find *find_handle;
gboolean ok;
- int thr_ret;
if (handle == NULL) {
SetLastError (ERROR_INVALID_HANDLE);
return(FALSE);
}
- thr_ret = mono_w32handle_lock_handle (handle);
- g_assert (thr_ret == 0);
+ mono_w32handle_lock_handle (handle);
g_strfreev (find_handle->namelist);
g_free (find_handle->dir_part);
- thr_ret = mono_w32handle_unlock_handle (handle);
- g_assert (thr_ret == 0);
+ mono_w32handle_unlock_handle (handle);
mono_w32handle_unref (handle);