2 * Copyright (C) 1996-2020 The Squid Software Foundation and contributors
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.
10 #define __ASYNC_IO_H__
12 #if HAVE_DISKIO_MODULE_AIO
15 #include "DiskIO/AIO/aio_win32.h"
22 #include "mem/forward.h"
24 #define MAX_ASYNCOP 128
27 AQ_STATE_NONE
, /* Not active/uninitialised */
28 AQ_STATE_SETUP
/* Initialised */
29 } async_queue_state_t
;
34 } async_queue_entry_state_t
;
40 } async_queue_entry_type_t
;
42 typedef struct _async_queue_entry async_queue_entry_t
;
44 typedef struct _async_queue async_queue_t
;
46 /* An async queue entry */
50 struct _async_queue_entry
{
51 async_queue_entry_state_t aq_e_state
;
52 async_queue_entry_type_t aq_e_type
;
54 /* 64-bit environments with non-GCC complain about the type mismatch on Linux */
55 #if defined(__USE_FILE_OFFSET64) && !defined(__GNUC__)
56 struct aiocb64 aq_e_aiocb
;
58 struct aiocb aq_e_aiocb
;
61 void *aq_e_callback_data
;
70 async_queue_state_t aq_state
;
71 async_queue_entry_t aq_queue
[MAX_ASYNCOP
]; /* queued ops */
72 int aq_numpending
; /* Num of pending ops */
75 #endif /* HAVE_DISKIO_MODULE_AIO */
76 #endif /* __ASYNC_IO_H_ */