/*
- * $Id$
- *
* DEBUG: section 81 aio_xxx() POSIX emulation on Windows
* AUTHOR: Guido Serassio <serassio@squid-cache.org>
*
*
*/
-#include "squid-old.h"
+#include "squid.h"
#include "comm.h"
-#include "aio_win32.h"
+#include "DiskIO/AIO/aio_win32.h"
+#include "fd.h"
+#include "StatCounters.h"
+#include "win32.h"
+
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
#if _SQUID_WINDOWS_
VOID CALLBACK IoCompletionRoutine(DWORD dwErrorCode,
xfree(lpOverlapped);
}
-
int aio_read(struct aiocb *aiocbp)
{
LPOVERLAPPED Overlapped;
/* Test to see if the I/O was queued successfully. */
if (!IoOperationStatus) {
errno = GetLastError();
- debugs(81,1, "aio_read: GetLastError=" << errno );
+ debugs(81, DBG_IMPORTANT, "aio_read: GetLastError=" << errno );
return -1;
}
return 0;
}
-
int aio_read64(struct aiocb64 *aiocbp)
{
LPOVERLAPPED Overlapped;
/* Test to see if the I/O was queued successfully. */
if (!IoOperationStatus) {
errno = GetLastError();
- debugs(81, 1, "aio_read: GetLastError=" << errno );
+ debugs(81, DBG_IMPORTANT, "aio_read: GetLastError=" << errno );
return -1;
}
return 0;
}
-
int aio_write(struct aiocb *aiocbp)
{
LPOVERLAPPED Overlapped;
/* Test to see if the I/O was queued successfully. */
if (!IoOperationStatus) {
errno = GetLastError();
- debugs(81, 1, "aio_write: GetLastError=" << errno );
+ debugs(81, DBG_IMPORTANT, "aio_write: GetLastError=" << errno );
return -1;
}
return 0;
}
-
int aio_write64(struct aiocb64 *aiocbp)
{
LPOVERLAPPED Overlapped;
/* Test to see if the I/O was queued successfully. */
if (!IoOperationStatus) {
errno = GetLastError();
- debugs(81, 1, "aio_write: GetLastError=" << errno );
+ debugs(81, DBG_IMPORTANT, "aio_write: GetLastError=" << errno );
return -1;
}
return 0;
}
-
int aio_error(const struct aiocb * aiocbp)
{
return aiocbp->aio_sigevent.sigev_notify;
}
-
int aio_error64(const struct aiocb64 * aiocbp)
{
return aiocbp->aio_sigevent.sigev_notify;
}
-
int aio_open(const char *path, int mode)
{
HANDLE hndl;
return fd;
}
-
void aio_close(int fd)
{
CloseHandle((HANDLE)_get_osfhandle(fd));
++ statCounter.syscalls.disk.closes;
}
-
ssize_t aio_return(struct aiocb * aiocbp)
{
return aiocbp->aio_sigevent.sigev_signo;
}
-
ssize_t aio_return64(struct aiocb64 * aiocbp)
{