Makes a copy of a communication handle
(&self)
| 49 | impl Clone for CommHandle { |
| 50 | /// Makes a copy of a communication handle |
| 51 | fn clone(&self) -> Self { |
| 52 | let error: u64; |
| 53 | let new_handle: u32; |
| 54 | unsafe { |
| 55 | asm!("syscall", |
| 56 | in("rax") SYSCALL_COPY_RENDEZVOUS, |
| 57 | in("rdi") self.0, // First argument |
| 58 | lateout("rax") error, |
| 59 | lateout("rdi") new_handle, |
| 60 | out("rcx") _, |
| 61 | out("r11") _); |
| 62 | } |
| 63 | if error != 0 { |
| 64 | panic!("CommHandle::clone({:X}) error {}", self.0, error); |
| 65 | } |
| 66 | CommHandle(new_handle) |
| 67 | } |
| 68 | } |
| 69 | |
| 70 | /// Handle to a chunk of memory that can be |
no test coverage detected