Skip to content

Commit c643576

Browse files
Hasini GunasingheGerrit Code Review
authored andcommitted
Merge "Implement Send for RpcServerConnection" into main
2 parents 041ee31 + 18f3c16 commit c643576

File tree

1 file changed

+4
-0
lines changed
  • libs/binder/rust/rpcbinder/src/server

1 file changed

+4
-0
lines changed

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)