/*
- * $Id$
- *
* SQUID Web Proxy Cache http://www.squid-cache.org/
* ----------------------------------------------------------
*
*/
#include "squid.h"
-#include "AIODiskIOStrategy.h"
#include "AIODiskFile.h"
+#include "AIODiskIOStrategy.h"
#include "DiskIO/IORequestor.h"
#include "DiskIO/ReadRequest.h"
#include "DiskIO/WriteRequest.h"
-AIODiskIOStrategy::AIODiskIOStrategy()
+AIODiskIOStrategy::AIODiskIOStrategy() :
+ fd(-1)
{
+ aq.aq_state = AQ_STATE_NONE;
aq.aq_numpending = 0;
+ memset(&aq.aq_queue, 0, sizeof(aq.aq_queue));
}
AIODiskIOStrategy::~AIODiskIOStrategy()
callback();
}
+bool
+AIODiskIOStrategy::unlinkdUseful() const
+{
+ return false;
+}
+
void
AIODiskIOStrategy::unlinkFile (char const *)
{}
void *cbdata;
int callback_valid;
void *buf;
- int fd;
async_queue_entry_t *aqe;
async_queue_entry_type_t type;
/* Loop through all slots */
- for (i = 0; i < MAX_ASYNCOP; i++) {
+ for (i = 0; i < MAX_ASYNCOP; ++i) {
if (aq.aq_queue[i].aq_e_state == AQ_ENTRY_USED) {
aqe = &aq.aq_queue[i];
/* Active, get status */
/* Get the callback parameters */
freefunc = aqe->aq_e_free;
buf = aqe->aq_e_buf;
- fd = aqe->aq_e_fd;
type = aqe->aq_e_type;
callback_valid = cbdataReferenceValidDone(aqe->aq_e_callback_data, &cbdata);
AIODiskFile * theFile = NULL;
{
/* Later we should use something a little more .. efficient :) */
- for (int i = 0; i < MAX_ASYNCOP; i++) {
+ for (int i = 0; i < MAX_ASYNCOP; ++i) {
if (aq.aq_queue[i].aq_e_state == AQ_ENTRY_FREE)
/* Found! */
return i;