Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maintenance: Remove change-minimizing MemObject::Io hack #1957

Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions src/MemObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,19 +168,17 @@ class MemObject

SwapOut swapout;

/* TODO: Remove this change-minimizing hack */
using Io = Store::IoStatus;
static constexpr Io ioUndecided = Store::ioUndecided;
static constexpr Io ioReading = Store::ioReading;
static constexpr Io ioWriting = Store::ioWriting;
static constexpr Io ioDone = Store::ioDone;
static constexpr Store::IoStatus ioUndecided = Store::ioUndecided;
static constexpr Store::IoStatus ioReading = Store::ioReading;
static constexpr Store::IoStatus ioWriting = Store::ioWriting;
static constexpr Store::IoStatus ioDone = Store::ioDone;
rousskov marked this conversation as resolved.
Show resolved Hide resolved

/// State of an entry with regards to the [shared] in-transit table.
class XitTable
{
public:
/// associate our StoreEntry with a Transients entry at the given index
void open(const int32_t anIndex, const Io anIo)
void open(const int32_t anIndex, const Store::IoStatus anIo)
{
index = anIndex;
io = anIo;
Expand All @@ -194,7 +192,7 @@ class MemObject
}

int32_t index = -1; ///< entry position inside the in-transit table
Io io = ioUndecided; ///< current I/O state
Store::IoStatus io = ioUndecided; ///< current I/O state
};
XitTable xitTable; ///< current [shared] memory caching state for the entry

Expand All @@ -205,7 +203,7 @@ class MemObject
int32_t index = -1; ///< entry position inside the memory cache
int64_t offset = 0; ///< bytes written/read to/from the memory cache so far

Io io = ioUndecided; ///< current I/O state
Store::IoStatus io = ioUndecided; ///< current I/O state
};
MemCache memCache; ///< current [shared] memory caching state for the entry

Expand Down