From f39279b41d1e26ece1cc67edefa14f95d0b90df5 Mon Sep 17 00:00:00 2001 From: Szymon Zadworny Date: Thu, 6 Aug 2026 09:09:49 +0000 Subject: [PATCH] Add send and sync impl for opaque cxx types --- oneapi-rs-sys/src/types-sys.rs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/oneapi-rs-sys/src/types-sys.rs b/oneapi-rs-sys/src/types-sys.rs index c675165..c3237fc 100644 --- a/oneapi-rs-sys/src/types-sys.rs +++ b/oneapi-rs-sys/src/types-sys.rs @@ -104,3 +104,27 @@ pub mod ffi { impl Vec {} impl Vec {} } + +unsafe impl Send for ffi::Device {} +unsafe impl Sync for ffi::Device {} + +unsafe impl Send for ffi::Platform {} +unsafe impl Sync for ffi::Platform {} + +unsafe impl Send for ffi::Queue {} +unsafe impl Sync for ffi::Queue {} + +unsafe impl Send for ffi::Event {} +unsafe impl Sync for ffi::Event {} + +unsafe impl Send for ffi::Context {} +unsafe impl Sync for ffi::Context {} + +unsafe impl Send for ffi::Kernel {} +unsafe impl Sync for ffi::Kernel {} + +unsafe impl Send for ffi::SourceKernelBundle {} +unsafe impl Sync for ffi::SourceKernelBundle {} + +unsafe impl Send for ffi::ExecutableKernelBundle {} +unsafe impl Sync for ffi::ExecutableKernelBundle {}