summaryrefslogtreecommitdiff
path: root/libs/binder
diff options
context:
space:
mode:
author Hasini Gunasinghe <hasinitg@google.com> 2025-03-14 21:18:49 -0700
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2025-03-14 21:18:49 -0700
commit22795fe48f7c1f17a5a480b72e90ccfd92baeed9 (patch)
tree03ed02a6f2a4cc4d039a62a80667b4cf1c00cf34 /libs/binder
parent7e6be236a6f64c2a76f4590a47edca43361ab557 (diff)
parentc643576c0519f8bd7dc09165fea17b18e1631c62 (diff)
Merge "Implement Send for RpcServerConnection" into main am: c643576c05
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/3398707 Change-Id: Ie59c0d96d355b2ba307e38fe66d72a1239cf5d0f Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'libs/binder')
-rw-r--r--libs/binder/rust/rpcbinder/src/server/trusty.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/binder/rust/rpcbinder/src/server/trusty.rs b/libs/binder/rust/rpcbinder/src/server/trusty.rs
index fe45decf25..54d82d5bd0 100644
--- a/libs/binder/rust/rpcbinder/src/server/trusty.rs
+++ b/libs/binder/rust/rpcbinder/src/server/trusty.rs
@@ -106,6 +106,10 @@ pub struct RpcServerConnection {
ctx: *mut c_void,
}
+// SAFETY: The opaque handle: `ctx` points into a dynamic allocation,
+// and not tied to anything specific to the current thread.
+unsafe impl Send for RpcServerConnection {}
+
impl Drop for RpcServerConnection {
fn drop(&mut self) {
// We do not need to close handle_fd since we do not own it.