Squid Web Cache
master
Loading...
Searching...
No Matches
StoreIOState.cc
Go to the documentation of this file.
1
/*
2
* Copyright (C) 1996-2025 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
17
void
*
18
StoreIOState::operator
new
(
size_t
)
19
{
20
assert
(0);
21
return
(
void
*)1;
22
}
23
24
void
25
StoreIOState::operator
delete
(
void
*)
26
{
27
assert
(0);
28
}
29
30
StoreIOState::StoreIOState
(
StoreIOState::STIOCB
*cbIo,
void
*data) :
31
swap_dirn(-1),
32
swap_filen(-1),
33
e(nullptr),
34
mode(
O_BINARY
),
35
offset_(0),
36
callback(cbIo),
37
callback_data(
cbdataReference
(data))
38
{
39
read
.callback =
nullptr
;
40
read
.callback_data =
nullptr
;
41
flags
.closing =
false
;
42
}
43
44
StoreIOState::~StoreIOState
()
45
{
46
debugs
(20,3,
"StoreIOState::~StoreIOState: "
<<
this
);
47
48
cbdataReferenceDone
(
read
.callback_data);
49
cbdataReferenceDone
(
callback_data
);
50
}
51
52
bool
StoreIOState::touchingStoreEntry
()
const
53
{
54
return
e
&&
e
->
swap_filen
==
swap_filen
;
55
}
56
StoreIOState.h
Store.h
assert
#define assert(EX)
Definition
assert.h:17
cbdataReferenceDone
#define cbdataReferenceDone(var)
Definition
cbdata.h:357
cbdataReference
#define cbdataReference(var)
Definition
cbdata.h:348
StoreEntry::swap_filen
sfileno swap_filen
unique ID inside a cache_dir for swapped out entries; -1 for others
Definition
Store.h:235
StoreIOState::~StoreIOState
~StoreIOState() override
Definition
StoreIOState.cc:44
StoreIOState::callback_data
void * callback_data
Definition
StoreIOState.h:77
StoreIOState::flags
struct StoreIOState::@125 flags
StoreIOState::swap_filen
sfileno swap_filen
Definition
StoreIOState.h:72
StoreIOState::StoreIOState
StoreIOState(StoreIOState::STIOCB *, void *cbData)
Definition
StoreIOState.cc:30
StoreIOState::e
StoreEntry * e
Definition
StoreIOState.h:73
StoreIOState::touchingStoreEntry
bool touchingStoreEntry() const
Definition
StoreIOState.cc:52
StoreIOState::read
struct StoreIOState::@124 read
StoreIOState::STIOCB
void STIOCB(void *their_data, int errflag, StoreIOState::Pointer self)
Definition
StoreIOState.h:39
Stream.h
debugs
#define debugs(SECTION, LEVEL, CONTENT)
Definition
Stream.h:192
defines.h
O_BINARY
#define O_BINARY
Definition
defines.h:134
squid.h
size_t
int const char size_t
Definition
stub_liblog.cc:83
squid
src
StoreIOState.cc
Generated by
1.9.8