]> git.ipfire.org Git - thirdparty/squid.git/blame - src/DiskIO/AIO/aio_win32.h
Docs: Copyright updates for 2018 (#114)
[thirdparty/squid.git] / src / DiskIO / AIO / aio_win32.h
CommitLineData
1b52df9a 1/*
5b74111a 2 * Copyright (C) 1996-2018 The Squid Software Foundation and contributors
1b52df9a 3 *
bbc27441
AJ
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
1b52df9a 7 */
8
abb2a3d9 9#ifndef __WIN32_AIO_H__
10#define __WIN32_AIO_H__
11
d9691f09 12#if HAVE_DISKIO_MODULE_AIO
2513178d 13
abb2a3d9 14#ifndef off64_t
f53969cc 15typedef int64_t off64_t;
abb2a3d9 16#endif
17
7aa9bb3e 18#if _SQUID_WINDOWS_
02529124 19
abb2a3d9 20union sigval {
21 int sival_int; /* integer value */
22 void *sival_ptr; /* pointer value */
23};
24
26ac0430 25struct sigevent {
abb2a3d9 26 int sigev_notify; /* notification mode */
27 int sigev_signo; /* signal number */
28 union sigval sigev_value; /* signal value */
29};
30
02529124 31// #endif
abb2a3d9 32
26ac0430 33struct aiocb64 {
abb2a3d9 34 int aio_fildes; /* file descriptor */
35 void *aio_buf; /* buffer location */
36 size_t aio_nbytes; /* length of transfer */
37 off64_t aio_offset; /* file offset */
38 int aio_reqprio; /* request priority offset */
39
40 struct sigevent aio_sigevent; /* signal number and offset */
41 int aio_lio_opcode; /* listio operation */
42};
43
26ac0430 44struct aiocb {
abb2a3d9 45 int aio_fildes; /* file descriptor */
46 void *aio_buf; /* buffer location */
47 size_t aio_nbytes; /* length of transfer */
48#if (_FILE_OFFSET_BITS == 64)
49
50 off64_t aio_offset; /* file offset */
51#else
52
53 off_t aio_offset; /* file offset */
54#endif
55
56 int aio_reqprio; /* request priority offset */
57
58 struct sigevent aio_sigevent; /* signal number and offset */
59 int aio_lio_opcode; /* listio operation */
60};
61
62int aio_read(struct aiocb *);
63
64int aio_write(struct aiocb *);
65
66ssize_t aio_return(struct aiocb *);
67
68int aio_error(const struct aiocb *);
69
70int aio_read64(struct aiocb64 *);
71
72int aio_write64(struct aiocb64 *);
73
74ssize_t aio_return64(struct aiocb64 *);
75
76int aio_error64(const struct aiocb64 *);
77int aio_open(const char *, int);
78void aio_close(int);
79
7aa9bb3e 80#endif /* _SQUID_WINDOWS_ */
d9691f09 81#endif /* HAVE_DISKIO_MODULE_AIO */
02529124 82#endif /* __WIN32_AIO_H__ */
f53969cc 83