|
Squid Web Cache master
|
a MemMap basic element, holding basic shareable memory block info More...
#include <MemMap.h>
Public Member Functions | |
| MemMapSlot () | |
| size_t | size () const |
| size_t | keySize () const |
| bool | sameKey (const cache_key *const aKey) const |
| void | set (const unsigned char *aKey, const void *block, size_t blockSize, time_t expire=0) |
| bool | empty () const |
| bool | reading () const |
| bool | writing () const |
Public Attributes | |
| std::atomic< uint8_t > | waitingToBeFreed |
| may be accessed w/o a lock | |
| ReadWriteLock | lock |
| protects slot data below | |
| unsigned char | key [MEMMAP_SLOT_KEY_SIZE] |
| The entry key. | |
| unsigned char | p [MEMMAP_SLOT_DATA_SIZE] |
| The memory block;. | |
| size_t | pSize |
| time_t | expire |
| Ipc::MemMapSlot::MemMapSlot | ( | ) |
| bool Ipc::MemMapSlot::empty | ( | ) | const |
Definition at line 316 of file MemMap.cc.
Referenced by Ipc::MemMap::freeLocked(), Ipc::MemMap::openForReadingAt(), and Ipc::MemMap::openForWritingAt().
|
inline |
|
inline |
Definition at line 42 of file MemMap.h.
References lock, and Ipc::ReadWriteLock::readers.
Referenced by Ipc::MemMap::closeForReading(), Ipc::MemMap::openForWritingAt(), and Ipc::MemMap::peekAtReader().
| bool Ipc::MemMapSlot::sameKey | ( | const cache_key *const | aKey | ) | const |
| void Ipc::MemMapSlot::set | ( | const unsigned char * | aKey, |
| const void * | block, | ||
| size_t | blockSize, | ||
| time_t | expire = 0 |
||
| ) |
|
inline |
Definition at line 37 of file MemMap.h.
References MemMapSlot().
|
inline |
Definition at line 43 of file MemMap.h.
References lock, and Ipc::ReadWriteLock::writing.
Referenced by Ipc::MemMap::abortWriting(), Ipc::MemMap::closeForWriting(), Ipc::MemMap::openForWritingAt(), Ipc::MemMap::peekAtReader(), and Ipc::MemMap::switchWritingToReading().
| unsigned char Ipc::MemMapSlot::key[MEMMAP_SLOT_KEY_SIZE] |
Definition at line 47 of file MemMap.h.
Referenced by MemMapSlot(), Ipc::MemMap::freeLocked(), and keySize().
|
mutable |
Definition at line 46 of file MemMap.h.
Referenced by Ipc::MemMap::closeForReading(), Ipc::MemMap::closeForWriting(), Ipc::MemMap::free(), Ipc::MemMap::freeLocked(), Ipc::MemMap::openForReadingAt(), Ipc::MemMap::openForWritingAt(), reading(), Ipc::MemMap::switchWritingToReading(), and writing().
| unsigned char Ipc::MemMapSlot::p[MEMMAP_SLOT_DATA_SIZE] |
Definition at line 48 of file MemMap.h.
Referenced by MemMapSlot().
| std::atomic<uint8_t> Ipc::MemMapSlot::waitingToBeFreed |
Definition at line 45 of file MemMap.h.
Referenced by Ipc::MemMap::free(), Ipc::MemMap::freeLocked(), Ipc::MemMap::openForReadingAt(), and Ipc::MemMap::openForWritingAt().