Use DynamicViralPostingInvoker in at/detachStimBuffDeviceCReq

This commit is contained in:
2026-05-31 07:13:53 -04:00
parent c2eea37a7b
commit d1c74a027c
6 changed files with 62 additions and 25 deletions
+11 -4
View File
@@ -9,7 +9,9 @@
#include <vector>
#include <preprocessor.h>
#include <user/deviceAttachmentSpec.h>
#include <spinscale/co/dynamicPostingInvoker.h>
#include <spinscale/co/invokers.h>
#include <spinscale/co/postTarget.h>
#include <spinscale/componentThread.h>
#define CL_TARGET_OPENCL_VERSION 120
#include <CL/cl.h>
@@ -41,8 +43,9 @@ struct SmoThreadingModelDesc
* SMO will usually pass in the Marionette thread here.
*
* State management that's tied to a particular attachment spec should be
* done on the ComponentThread for the thread that SMO provided in the
* attachDeviceCReq call.
* done on the ComponentThread passed to attachDeviceCReq. The attach and
* detach coroutines run on the thread named by ExplicitPostTarget (post-TO);
* SMO orchestration stays on the marionette thread.
*/
std::shared_ptr<sscl::ComponentThread> componentThread;
};
@@ -55,10 +58,14 @@ struct StimBuffDeviceOpResult
using sal_mlo_initializeCIndFn = sscl::co::ViralNonPostingInvoker<int>(void);
using sal_mlo_finalizeCIndFn = sscl::co::ViralNonPostingInvoker<int>(void);
using sal_mlo_attachDeviceCReqFn = sscl::co::ViralNonPostingInvoker<StimBuffDeviceOpResult>(
using sal_mlo_attachDeviceCReqFn =
sscl::co::DynamicViralPostingInvoker<StimBuffDeviceOpResult>(
sscl::co::ExplicitPostTarget postTarget,
const std::shared_ptr<device::DeviceAttachmentSpec>& desc,
const std::shared_ptr<sscl::ComponentThread>& componentThread);
using sal_mlo_detachDeviceCReqFn = sscl::co::ViralNonPostingInvoker<StimBuffDeviceOpResult>(
using sal_mlo_detachDeviceCReqFn =
sscl::co::DynamicViralPostingInvoker<StimBuffDeviceOpResult>(
sscl::co::ExplicitPostTarget postTarget,
const std::shared_ptr<device::DeviceAttachmentSpec>& desc);
/**