]> git.ipfire.org Git - thirdparty/squid.git/blame - src/DiskIO/AIO/aio_win32.h
Removed CVS $ markers
[thirdparty/squid.git] / src / DiskIO / AIO / aio_win32.h
CommitLineData
1b52df9a 1/*
1b52df9a 2 * AUTHOR: Guido Serassio <serassio@squid-cache.org>
3 *
4 * SQUID Web Proxy Cache http://www.squid-cache.org/
5 * ----------------------------------------------------------
6 *
7 * Squid is the result of efforts by numerous individuals from
8 * the Internet community; see the CONTRIBUTORS file for full
9 * details. Many organizations have provided support for Squid's
10 * development; see the SPONSORS file for full details. Squid is
11 * Copyrighted (C) 2001 by the Regents of the University of
12 * California; see the COPYRIGHT file for full details. Squid
13 * incorporates software developed and/or copyrighted by other
14 * sources; see the CREDITS file for full details.
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 2 of the License, or
19 * (at your option) any later version.
26ac0430 20 *
1b52df9a 21 * This program is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU General Public License for more details.
26ac0430 25 *
1b52df9a 26 * You should have received a copy of the GNU General Public License
27 * along with this program; if not, write to the Free Software
28 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
29 *
30 */
31
abb2a3d9 32#ifndef __WIN32_AIO_H__
33#define __WIN32_AIO_H__
34
2513178d
AJ
35#if USE_DISKIO_AIO
36
be266cb2 37#if _SQUID_CYGWIN_
abb2a3d9 38#include "squid_windows.h"
39#endif
40
41#ifndef off64_t
42typedef int64_t off64_t;
43#endif
44
1191b93b 45#if _SQUID_MSWIN_
02529124 46
abb2a3d9 47union sigval {
48 int sival_int; /* integer value */
49 void *sival_ptr; /* pointer value */
50};
51
26ac0430 52struct sigevent {
abb2a3d9 53 int sigev_notify; /* notification mode */
54 int sigev_signo; /* signal number */
55 union sigval sigev_value; /* signal value */
56};
57
02529124 58// #endif
abb2a3d9 59
26ac0430 60struct aiocb64 {
abb2a3d9 61 int aio_fildes; /* file descriptor */
62 void *aio_buf; /* buffer location */
63 size_t aio_nbytes; /* length of transfer */
64 off64_t aio_offset; /* file offset */
65 int aio_reqprio; /* request priority offset */
66
67 struct sigevent aio_sigevent; /* signal number and offset */
68 int aio_lio_opcode; /* listio operation */
69};
70
26ac0430 71struct aiocb {
abb2a3d9 72 int aio_fildes; /* file descriptor */
73 void *aio_buf; /* buffer location */
74 size_t aio_nbytes; /* length of transfer */
75#if (_FILE_OFFSET_BITS == 64)
76
77 off64_t aio_offset; /* file offset */
78#else
79
80 off_t aio_offset; /* file offset */
81#endif
82
83 int aio_reqprio; /* request priority offset */
84
85 struct sigevent aio_sigevent; /* signal number and offset */
86 int aio_lio_opcode; /* listio operation */
87};
88
89int aio_read(struct aiocb *);
90
91int aio_write(struct aiocb *);
92
93ssize_t aio_return(struct aiocb *);
94
95int aio_error(const struct aiocb *);
96
97int aio_read64(struct aiocb64 *);
98
99int aio_write64(struct aiocb64 *);
100
101ssize_t aio_return64(struct aiocb64 *);
102
103int aio_error64(const struct aiocb64 *);
104int aio_open(const char *, int);
105void aio_close(int);
106
02529124 107#endif /* _SQUID_MSWIN_ */
2513178d 108#endif /* USE_DISKIO_AIO */
02529124 109#endif /* __WIN32_AIO_H__ */