Use DynamicViralPostingInvoker in at/detachStimBuffDeviceCReq
This commit is contained in:
@@ -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);
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user