summaryrefslogtreecommitdiff
path: root/libs/binder
diff options
context:
space:
mode:
author Hasini Gunasinghe <hasinitg@google.com> 2025-03-14 20:52:56 -0700
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2025-03-14 20:52:56 -0700
commitc643576c0519f8bd7dc09165fea17b18e1631c62 (patch)
tree03ed02a6f2a4cc4d039a62a80667b4cf1c00cf34 /libs/binder
parent041ee31d8ec9362c388e9b42b0f4947426cf1b3a (diff)
parent18f3c168f232ac4de431063b1fd53c1e89702edf (diff)
Merge "Implement Send for RpcServerConnection" into main
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.