Make [at|de]tachAllSenseDevices[FromSpecs] and initializeSalmanoff async

This is the culmination of a lot of changes over the last week. We're
making SMO basically fully async in many areas, and then preparing to
implement the spinqueueing mechanism for locking.
This commit is contained in:
2025-09-10 18:12:08 -04:00
parent 81842e4571
commit e08dc0678b
5 changed files with 236 additions and 120 deletions
+13 -3
View File
@@ -8,6 +8,7 @@
#include <optional>
#include <functional>
#include <componentThread.h>
#include <asynchronousLoop.h>
#include <senseApis/senseApiLib.h>
#include <user/deviceAttachmentSpec.h>
@@ -52,9 +53,16 @@ public:
void detachSenseDeviceReq(
const std::shared_ptr<device::DeviceAttachmentSpec>& spec,
detachSenseDeviceReqCbFn cb);
void attachAllSenseDevicesFromSpecs(void);
void detachAllSenseDevices(void);
void detachAllSenseDevicesReq(void);
typedef std::function<void(AsynchronousLoop &results)>
attachAllSenseDevicesFromSpecsReqCbFn;
typedef std::function<void(AsynchronousLoop &results)>
detachAllSenseDevicesReqCbFn;
void attachAllSenseDevicesFromSpecsReq(
attachAllSenseDevicesFromSpecsReqCbFn cb);
void detachAllSenseDevicesReq(
detachAllSenseDevicesReqCbFn cb);
std::string stringifyLibs() const;
@@ -69,6 +77,8 @@ private:
class AttachSenseDeviceReq;
class DetachSenseDeviceReq;
class AttachAllSenseDevicesFromSpecsReq;
class DetachAllSenseDevicesReq;
public:
static std::optional<std::string> searchForLibInSmoSearchPaths(