DevMgr,Dev: Add Qutexes

Add Qutex locks to both DeviceManager and Device. These will be
properly used in the upcoming patches.
This commit is contained in:
2025-09-28 01:27:32 -04:00
parent 51b70b179c
commit 572a8612ed
2 changed files with 15 additions and 7 deletions
+5 -1
View File
@@ -7,6 +7,7 @@
#include <sstream>
#include <user/deviceAttachmentSpec.h>
#include <deviceManager/deviceRole.h>
#include <qutex.h>
namespace smo {
namespace device {
@@ -14,7 +15,9 @@ namespace device {
class Device
{
public:
Device(const std::string& identifier) : deviceIdentifier(identifier) {}
Device(const std::string& identifier)
: deviceIdentifier(identifier), qutex("Device-" + identifier)
{}
std::string stringify() const
{
@@ -30,6 +33,7 @@ public:
public:
std::string deviceIdentifier;
std::vector<std::shared_ptr<DeviceRole>> deviceRoles;
Qutex qutex;
};
} // namespace device