Skip to content
Snippets Groups Projects
Verified Commit b063533a authored by Jacob Lorentzon's avatar Jacob Lorentzon
Browse files

Remove redox_phys{map,unmap}.

parent 884dce8e
No related branches found
No related tags found
No related merge requests found
......@@ -12,8 +12,6 @@ extern "C" {
ssize_t redox_fpath(int fd, void * buf, size_t count);
void * redox_physalloc(size_t size);
int redox_physfree(void * physical_address, size_t size);
void * redox_physmap(void * physical_address, size_t size, int flags);
int redox_physunmap(void * virtual_address);
#endif
......
......@@ -27,29 +27,6 @@ pub unsafe extern "C" fn redox_physfree(physical_address: *mut c_void, size: siz
e(syscall::physfree(physical_address as usize, size)) as c_int
}
#[no_mangle]
pub unsafe extern "C" fn redox_physmap(
physical_address: *mut c_void,
size: size_t,
flags: c_int,
) -> *mut c_void {
let res = e(syscall::physmap(
physical_address as usize,
size,
syscall::PhysmapFlags::from_bits(flags as usize).expect("physmap: invalid bit pattern"),
));
if res == !0 {
return ptr::null_mut();
} else {
return res as *mut c_void;
}
}
#[no_mangle]
pub unsafe extern "C" fn redox_physunmap(virtual_address: *mut c_void) -> c_int {
e(syscall::physunmap(virtual_address as usize)) as c_int
}
pub fn pipe2(fds: &mut [c_int], flags: usize) -> syscall::error::Result<()> {
let fds =
<&mut [c_int; 2]>::try_from(fds).expect("expected Pal pipe2 to have validated pipe2 array");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment