fix atomic

This commit is contained in:
2025-12-10 21:15:39 +01:00
parent a4f15460d3
commit 4b0ec380b1
6 changed files with 134 additions and 19 deletions

View File

@ -33,16 +33,18 @@ public:
NVME
};
struct
struct ShredSpeed
{
time_t u32ShredTimeDelta;
std::chrono::time_point<std::chrono::system_clock> chronoShredTimestamp;
std::chrono::time_point<std::chrono::system_clock>
chronoShredTimestamp;
unsigned long ulWrittenBytes;
unsigned long ulSpeedMetricBytesWritten;
} sShredSpeed;
};
std::atomic<TaskState> state;
std::atomic<ConnectionType> connectionType;
std::atomic<ShredSpeed> sShredSpeed;
bool bWasShredded = false; // all shred iterations done
bool bWasShredStarted = false; // shred was atleast once started
@ -76,6 +78,18 @@ private:
protected:
public:
// Copy constructor
Drive(const Drive &other);
// Copy assignment operator
Drive &operator=(const Drive &other);
// Move constructor
Drive(Drive &&other) noexcept;
// Move assignment operator
Drive &operator=(Drive &&other) noexcept;
Drive(std::string path)
{
this->sPath = path;