diff --git a/src/service.rs b/src/service.rs index 83feb5653c1..6428442a517 100644 --- a/src/service.rs +++ b/src/service.rs @@ -205,9 +205,6 @@ where dispatch: D, } -// need to be able to send crypto service to an interrupt handler -unsafe impl Send for Service {} - impl ServiceResources

{ pub fn certstore(&mut self, ctx: &CoreContext) -> Result> { self.rng() diff --git a/src/virt.rs b/src/virt.rs index a1eb419b5ff..c5a5631189e 100644 --- a/src/virt.rs +++ b/src/virt.rs @@ -105,8 +105,8 @@ impl<'a, I: 'static, C> Runner<'a, I, C> { pub fn run(self, platform: P, dispatch: D, f: F) -> R where - P: platform::Platform, - D: Dispatch, + P: platform::Platform + Send, + D: Dispatch + Send, C: Send + Sync, I: Send + Sync, F: FnOnce() -> R, @@ -160,7 +160,7 @@ impl Platform<'_> { self.run_client_with_backends(client_id, CoreOnly, &[], test) } - pub fn run_client_with_backends( + pub fn run_client_with_backends( self, client_id: &str, dispatch: D, @@ -197,7 +197,7 @@ impl Platform<'_> { } /// Using const generics rather than a `Vec` to allow destructuring in the method - pub fn run_clients_with_backends( + pub fn run_clients_with_backends( self, client_ids: [(&str, &'static [BackendId]); N], dispatch: D, diff --git a/src/virt/store.rs b/src/virt/store.rs index e2ba2dee2d7..626aa3398af 100644 --- a/src/virt/store.rs +++ b/src/virt/store.rs @@ -166,3 +166,5 @@ impl store::Store for Store<'_> { self.volatile } } + +unsafe impl Send for Store<'_> {}