#[unstable(feature = "sgx_platform", issue = "56975")]
pub fn read_alloc(fd: Fd) -> IoResult<Vec<u8>> {
unsafe {
- let mut userbuf = alloc::User::<ByteBuffer>::uninitialized();
+ let userbuf = ByteBuffer { data: ::ptr::null_mut(), len: 0 };
+ let mut userbuf = alloc::User::new_from_enclave(&userbuf);
raw::read_alloc(fd, userbuf.as_raw_mut_ptr()).from_sgx_result()?;
Ok(userbuf.copy_user_buffer())
}
/// Usercall `exit`. See the ABI documentation for more information.
#[unstable(feature = "sgx_platform", issue = "56975")]
pub fn exit(panic: bool) -> ! {
- unsafe { super::panic::usercall_exit(panic) }
+ unsafe { raw::exit(panic) }
}
/// Usercall `wait`. See the ABI documentation for more information.