(path: &str)
| 618 | } |
| 619 | |
| 620 | pub fn umount(path: &str) -> Result<(), SyscallError> { |
| 621 | let error: u64; |
| 622 | unsafe { |
| 623 | asm!("syscall", |
| 624 | // RAX contains syscall (8) |
| 625 | in("rax") SYSCALL_UMOUNT, |
| 626 | // RDI contains pointer to string data |
| 627 | in("rdi") path.as_ptr() as usize, |
| 628 | // RSI contains string length |
| 629 | in("rsi") path.len(), |
| 630 | lateout("rax") error, |
| 631 | out("rcx") _, |
| 632 | out("r11") _); |
| 633 | } |
| 634 | if error == 0 { |
| 635 | Ok(()) |
| 636 | } else { |
| 637 | Err(SyscallError(error)) |
| 638 | } |
| 639 | } |
| 640 | |
| 641 | /// Wait for a hardware interrupt to occur |
| 642 | pub fn await_interrupt() { |
nothing calls this directly
no test coverage detected