Skip to content

Commit 18f3c16

Browse files
author
Hasini Gunasinghe
committed
Implement Send for RpcServerConnection
Test: N/A Bug: 382291660 Change-Id: I0e5fbede384c67439d54c7b8f53ae8622886f704
1 parent fcbbe17 commit 18f3c16

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

  • libs/binder/rust/rpcbinder/src/server

libs/binder/rust/rpcbinder/src/server/trusty.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,10 @@ pub struct RpcServerConnection {
106106
ctx: *mut c_void,
107107
}
108108

109+
// SAFETY: The opaque handle: `ctx` points into a dynamic allocation,
110+
// and not tied to anything specific to the current thread.
111+
unsafe impl Send for RpcServerConnection {}
112+
109113
impl Drop for RpcServerConnection {
110114
fn drop(&mut self) {
111115
// We do not need to close handle_fd since we do not own it.

0 commit comments

Comments
 (0)