make members atomic

This commit is contained in:
2025-12-10 20:40:48 +01:00
parent acc05dac8b
commit a4f15460d3
8 changed files with 52 additions and 49 deletions

View File

@ -14,7 +14,7 @@ class Drive
{
public:
enum TaskState
enum class TaskState
{
NONE,
SHRED_SELECTED,
@ -23,15 +23,15 @@ public:
DELETE_SELECTED,
DELETE_ACTIVE,
FROZEN
} state;
};
enum ConnectionType
enum class ConnectionType
{
UNKNOWN,
USB,
SATA,
NVME
} connectionType;
};
struct
{
@ -41,6 +41,9 @@ public:
unsigned long ulSpeedMetricBytesWritten;
} sShredSpeed;
std::atomic<TaskState> state;
std::atomic<ConnectionType> connectionType;
bool bWasShredded = false; // all shred iterations done
bool bWasShredStarted = false; // shred was atleast once started
bool bWasChecked = false; // all shred iterations and optional checking done