MCPcopy Create free account
hub / github.com/bendudson/EuraliOS / clone

Method clone

euralios_std/src/syscalls.rs:51–67  ·  view source on GitHub ↗

Makes a copy of a communication handle

(&self)

Source from the content-addressed store, hash-verified

49impl 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

Callers 15

new_shellMethod · 0.80
mainFunction · 0.80
exec_pathFunction · 0.80
get_dirMethod · 0.80
mainFunction · 0.80
get_deviceMethod · 0.80
get_dirMethod · 0.80
get_fileMethod · 0.80
make_dirMethod · 0.80
make_fileMethod · 0.80
mainFunction · 0.80
exec_pathFunction · 0.80

Calls 1

CommHandleClass · 0.85

Tested by

no test coverage detected