StoreIOState.cc
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2022 The Squid Software Foundation and contributors
3 *
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.
7 */
8
9/* DEBUG: section 20 Swap Dir base object */
10
11#include "squid.h"
12#include "debug/Stream.h"
13#include "defines.h"
14#include "Store.h"
15#include "StoreIOState.h"
16
17void *
18StoreIOState::operator new (size_t)
19{
20 assert(0);
21 return (void *)1;
22}
23
24void
25StoreIOState::operator delete (void *)
26{
27 assert(0);
28}
29
31 swap_dirn(-1),
32 swap_filen(-1),
33 e(nullptr),
34 mode(O_BINARY),
35 offset_(0),
36 file_callback(cbFile),
37 callback(cbIo),
38 callback_data(cbdataReference(data))
39{
40 read.callback = nullptr;
41 read.callback_data = nullptr;
42 flags.closing = false;
43}
44
46{
47 debugs(20,3, "StoreIOState::~StoreIOState: " << this);
48
49 if (read.callback_data)
50 cbdataReferenceDone(read.callback_data);
51
52 if (callback_data)
54}
55
57{
58 return e && e->swap_filen == swap_filen;
59}
60
#define assert(EX)
Definition: assert.h:19
#define cbdataReferenceDone(var)
Definition: cbdata.h:350
#define cbdataReference(var)
Definition: cbdata.h:341
sfileno swap_filen
unique ID inside a cache_dir for swapped out entries; -1 for others
Definition: Store.h:236
StoreIOState(StoreIOState::STFNCB *cbFile, StoreIOState::STIOCB *cbIo, void *data)
Definition: StoreIOState.cc:30
struct StoreIOState::@149 flags
void * callback_data
Definition: StoreIOState.h:90
void STFNCB(void *their_data, int errflag, StoreIOState::Pointer self)
Definition: StoreIOState.h:41
struct StoreIOState::@148 read
sfileno swap_filen
Definition: StoreIOState.h:84
StoreEntry * e
Definition: StoreIOState.h:85
bool touchingStoreEntry() const
Definition: StoreIOState.cc:56
virtual ~StoreIOState()
Definition: StoreIOState.cc:45
void STIOCB(void *their_data, int errflag, StoreIOState::Pointer self)
Definition: StoreIOState.h:51
#define debugs(SECTION, LEVEL, CONTENT)
Definition: Stream.h:196
#define O_BINARY
Definition: defines.h:136
int const char size_t
Definition: stub_liblog.cc:86

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors