Merge branch 'remove_redox_physmap_physunmap' into 'master'

Remove redox_phys{map,unmap}.

See merge request redox-os/relibc!414
This commit is contained in:
Jeremy Soller
2023-07-20 14:39:14 +00:00
2 changed files with 0 additions and 25 deletions
-2
View File
@@ -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
-23
View File
@@ -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");